The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

import-bot (20211) [Avatar] Offline
#1
[Originally posted by mulyap21]

Hi,

When I tried to test listing 13.1 on MIDP 2.0, the handphone
emulator hangs indefinitely. It seems that the networking
tutorials do not work on MIDP 2.0. When tested on MIDP 1.0.3,
it works well. Any suggestions on how to remedy this compatibility
problems?

Another problem is I always have to run the MIDP executable
on the bin directory where the MIDp is installed in. I have
already set the path of my autoexec.bat to point to the midp
bin directory (shown below), but there seems to be no effect
at all. Any suggestions on this problem?

The content of my autoexec.bat:

SET PATH=%PATH%;c:jdk1.4in;C:midp2.0fcsin;CsmilieROGRA~1RATIONALCOMMON
SET CLASSPATH=.

My system is running Windows XP home edition

Thank you.
import-bot (20211) [Avatar] Offline
#2
Re: Incompatible
[Originally posted by jwhite]

Mulyadi,

Thank you for the message. Indeed, the security model has changed in MIDP 2.0!

David and I are working on MIDP 2.0 changes to the apps. Until then, you can
read about the error situation and the potential fixes from the recommended
Sun links below.

In general, there needed to be added some security measure to avoid having a
cell phone call and Java application conflict with each other. This new model
helps to prevent the situation. However, the calls to get a connection now
need to be made in a separate thread.

So you have a couple of options:
The not recommended solution is to change all your MIDLETs to trusted, so the
system never asks you for permission.
The recommended solution is to make every blocking call in a separate thread,
so the system can ask you for permission and your call can be run too.

[SIDE NOTE for everyone also: check the URL in your code. In some of our
examples, David and I used www.catapult-technologies.com. This was our
company and it was sold last year. The URL is no longer valid.]

Two places for more information until we get some updates posted on this site
are:

1. The Sun MIDP/CLDC forum and then search for "deadlock"
http://forum.java.sun.com/forum.jsp?forum=76
2. http://wireless.java.sun.com/midp/ttips/clientserv/

As for your second question...I may need more detail. I assume you are trying
to run on the command line rather than through the toolkit. Are you getting a
class not found error?

Using Windows XP, MIDP 2.0 here was the command I ran. I did not need to set
anything in the environment.

C:WTK20appsMsgClientclasses>c:midp2.0fcsinmidp.exe
c:midp2.0fcsclasses;. com.ctimn.MsgClient

Thanks,
Jim White
> Hi,
>
> When I tried to test listing 13.1 on MIDP 2.0, the handphone
> emulator hangs indefinitely. It seems that the networking
> tutorials do not work on MIDP 2.0. When tested on MIDP 1.0.3,
> it works well. Any suggestions on how to remedy this compatibility
> problems?
>
> Another problem is I always have to run the MIDP executable
> on the bin directory where the MIDp is installed in. I have
> already set the path of my autoexec.bat to point to the midp
> bin directory (shown below), but there seems to be no effect
> at all. Any suggestions on this problem?
>
> The content of my autoexec.bat:
>
> SET PATH=%PATH%;c:jdk1.4in;C:midp2.0fcsin;CsmilieROGRA~1RATIONALCOMMON
> SET CLASSPATH=.
>
> My system is running Windows XP home edition
>
> Thank you.