Discussion:
Problem compiling MIDlet from SunONe
khalid shazia
2003-03-19 08:44:14 UTC
Permalink
Hi; <p>I am trying to run the Currency Converter example. I am using SunONe 4 for IDE and ***@ME Wireless Toolkit. I am regularly updating the SunONe thru update center. However, when i compile the files, it can't fine the microedition packages...
converter/ConverterMIDlet.java [11:1] package javax.microedition.midlet does not exist
import javax.microedition.midlet.*;
^
converter/ConverterMIDlet.java [12:1] package javax.microedition.lcdui does not exist
import javax.microedition.lcdui.*;
^
converter/ConverterMIDlet.java [13:1] package javax.microedition.rms does not exist
import javax.microedition.rms.*; <p>I haven't installed the standalone J2ME and my classpath also doesn't have any reference to J2ME. I thought that in SunONe there is no need to set these classpaths as it does them on its own... Is that right? Can any one help me out ... puleze...
<p>

<hr width=200 align=left>View/reply at <a href="http://swffjportal1/cgi-bin/WebX?13@@.ee85736">Problem compiling MIDlet from SunONe</a><br>
Peter Podsklan
2003-03-19 12:17:33 UTC
Permalink
Hi there,
mount midpapi.zip from J2ME WTK into Studio's Filesystems. FYI CLASSPATH
in Sun ONE Studio = CVS', jars and directories mounted in Filesystem.
Peter
Hi;
I am trying to run the Currency Converter example. I am using SunONe 4
thru update center. However, when i compile the files, it can't fine
the microedition packages... converter/ConverterMIDlet.java [11:1]
package javax.microedition.midlet does not exist import
javax.microedition.midlet.*; ^ converter/ConverterMIDlet.java [12:1]
package javax.microedition.lcdui does not exist import
javax.microedition.lcdui.*; ^ converter/ConverterMIDlet.java [13:1]
package javax.microedition.rms does not exist import
javax.microedition.rms.*;
I haven't installed the standalone J2ME and my classpath also doesn't
have any reference to J2ME. I thought that in SunONe there is no need
to set these classpaths as it does them on its own... Is that right?
Can any one help me out ... puleze...
------------------------------------------------------------------------
View/reply at Problem compiling MIDlet from SunONe
Unknown
2003-03-19 16:45:41 UTC
Permalink
Assuming you have the wireless module installed, what you need to do is
be sure you have the right execution settings on your files.

There are two ways to do this.

1) On each file, go to the Execution tab on the properties sheet, and
set executor to Emulator Executor, compiler to Preverify Compiler, and
debugger to Emulator Debugger.

2) Create a new project. After you create the project, the wireless
module will ask you if you want it to be a J2ME project or a J2SE
project. Choose J2ME. Bring all your files into this project, and they
will have the right defaults.

#2 is generally the better solution.

-Jan
Post by khalid shazia
converter/ConverterMIDlet.java [11:1] package javax.microedition.midlet does not exist
import javax.microedition.midlet.*;
^
converter/ConverterMIDlet.java [12:1] package javax.microedition.lcdui does not exist
import javax.microedition.lcdui.*;
^
converter/ConverterMIDlet.java [13:1] package javax.microedition.rms does not exist
import javax.microedition.rms.*; <p>I haven't installed the standalone J2ME and my classpath also doesn't have any reference to J2ME. I thought that in SunONe there is no need to set these classpaths as it does them on its own... Is that right? Can any one help me out ... puleze...
<p>
Martin Ryzl
2003-03-19 16:48:20 UTC
Permalink
Hi;
I am trying to run the Currency Converter example. I am using SunONe 4
thru update center. However, when i compile the files, it can't fine the
microedition packages... converter/ConverterMIDlet.java [11:1] package
javax.microedition.midlet does not exist import
javax.microedition.midlet.*; ^ converter/ConverterMIDlet.java [12:1]
package javax.microedition.lcdui does not exist import
javax.microedition.lcdui.*; ^ converter/ConverterMIDlet.java [13:1]
package javax.microedition.rms does not exist import
javax.microedition.rms.*;
be sure that:
1. you have added at least one emulator (in Explorer | Runtime tab|
Device Emulator Registry | Installed Emulators)
If you have installed J2ME Wireless Toolkit from S1S update center it
will be ok.
2. MIDP java sources use Preverify Compiler - right click on the source
in explorer | Properties |Excecution | Compiler. If you have created
java file using S1S MIDP templates, it will have correct compiler assigned.

Regards,
-Martin
I haven't installed the standalone J2ME and my classpath also doesn't
have any reference to J2ME. I thought that in SunONe there is no need to
set these classpaths as it does them on its own... Is that right? Can
any one help me out ... puleze...
------------------------------------------------------------------------
View/reply at Problem compiling MIDlet from SunONe
Loading...