Skip to main content

Need Help in compiling jxme demo

6 replies [Last post]
sungyi
Offline
Joined: 2009-06-09
Points: 0

Dear,

I am a new to JXTA/JXME and have tried to compile/run chat demo, but failed both.

Based on the instructions given in http://developers.sun.com/mobility/midp/articles/jxme/, I made a folder called Java at C:\Java and installed J2SE, Wireless Toolkit, Ant, and JXME(downloaded the ubversion) in it.
(C:\Java\jdk1.6.0_14, C:\WTK2.5.2_01, C:\Java\Ant, and C:\Java\jxta-jxme)

I think that WTK installed normally since I could run Game Demo by selecting WTK2.5.2 for CLDC->Run MIDP Applicaiton>C:\Java\WTK2.5.2_01\apps\Games\bin\Games.jad.
However, I get the following error when I try to run jxme demo chat in C:\Java\jxta-jxme\midp\demo\chat\bin\chat.jad

OTA server emulation started ...
HTTPS server emulation started ...
Error: Reason = 36

So, I tried to compile the C:\Java\jxta-jxme\midp.
Here are the environment variables in my XP running PC.
ANT_HOME=C:\Java\Ant
JAVA_HOME=C:\Java\jdk1.6.0_14
MIDP_HOME=C:\Java\WTK2.5.2_01.

First, when I tried "ant tools", I got errors with a message because the tools directory could not be found.
So I created the tools directory in C:\Java\jxta-jxme\midp\tools, and I got "Build Success".
Then, I tried "Ant" and the following error occured.

C:\Java\jxta-jxme\midp>ant
Buildfile: build.xml

prepare:

compile_cldc:
[echo] Disabling Doja...
[javac] Compiling 1 source file to C:\Java\jxta-jxme\midp\classes_cldc_unverified
[echo] Preverifying classes...
[exec] Error preverifying class net.jxta.j2me.ByteCounterOutputStream
[exec] java/lang/NoClassDefFoundError: java/io/OutputStream

BUILD FAILED
C:\Java\jxta-jxme\midp\build.xml:72: exec returned: 1

Total time: 0 seconds

lines 70 to 76 of build.xml are:

I welcome any comment and thanks for your help in advance.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
viking17611
Offline
Joined: 2008-01-06
Points: 0

check this line:

if you are using Windows platform, change the ":" to ";".
i.e.

Regards,
Viking

sungyi
Offline
Joined: 2009-06-09
Points: 0

Thanks for you help.

Accoring to your comment, I changed ":" to ";" and tried ant for both original build file and build2zorion.

Although I see some changes in the complile error messges, I still have hundreds of "cannot find symbol error".

I guess that the compiler can not access JDK library but do not know how to fix it.

Can you take a look at the attached compile error list?

Thanks again.

viking17611
Offline
Joined: 2008-01-06
Points: 0

HI,

check your MIDP_HOME setting pls. c:\java\wtk2.5* or c:\wtk2.5*?

Regards,
Viking

sungyi
Offline
Joined: 2009-06-09
Points: 0

Hi,

What do you mean by
"check your MIDP_HOME setting pls. c:\java\wtk2.5* or c:\wtk2.5*?" ?

Environments Variables in my PC are
ANT_HOME=C:\Java\Ant
JAVA_HOME=C:\Java\jdk1.6.0_14
MIDP_HOME=C:\Java\WTK2.5.2_01

Thanks for your comment.
Regards,

Sungwon.

viking17611
Offline
Joined: 2008-01-06
Points: 0

Hi,

your settings are NOT consistent
first: (C:\Java\jdk1.6.0_14, C:\WTK2.5.2_01, C:\Java\Ant, and C:\Java\jxta-jxme)
last:
ANT_HOME=C:\Java\Ant
JAVA_HOME=C:\Java\jdk1.6.0_14
MIDP_HOME=C:\Java\WTK2.5.2_01

check whether the MIDP_HOME setting is right.

Viking

sungyi
Offline
Joined: 2009-06-09
Points: 0

Hi Viking,

Thanks again for the reply and sorry for the confusion that I brought.

The environment described in the beginning of my question (C:\Java\jdk1.6.0_14, C:\WTK2.5.2_01, C:\Java\Ant, and C:\Java\jxta-jxme) is NOT right.
C:\WTK2.5.2_01 should be C:\Java\WTK2.5.2_01.

In fact, everyting (including jdk, ant, wtk, jxta-jxme) is under C:\Java.

Thanks.