javac for J2ME

J

Jacob

I know I can use the ktoolbar program to compile
code for the CDLC, but what is the javac equivalent?

I think it involves specifying -Xbootclasspath,
but I haven't found exactly how.

Thanks!
 
J

JScoobyCed

Jacob said:
I know I can use the ktoolbar program to compile
code for the CDLC, but what is the javac equivalent?

I think it involves specifying -Xbootclasspath,
but I haven't found exactly how.

Thanks!

All you need is to have the cdlc.jar and midp.jar in your classpth, then
use javac normally:

javac -cp .;midp20.jar;cdlc10.jar;.\src\ com.foo.MyMIDP.java
 
J

Jacob

JScoobyCed said:
All you need is to have the cdlc.jar and midp.jar in your classpth, then
use javac normally:

javac -cp .;midp20.jar;cdlc10.jar;.\src\ com.foo.MyMIDP.java

But I need to make sure rt.jar is *not* in my classpath,
shouldn't I? I think it is by default?
 
T

Tor Iver Wilhelmsen

Jacob said:
But I need to make sure rt.jar is *not* in my classpath,
shouldn't I? I think it is by default?

It's in the bootclasspath; you can exclude it by using -bootclasspath,
e.g.

javac -g:none -bootclasspath midp20.jar;cdlc10.jar
-classpath . com/foo/MyMIDP.java

and then run the .class files through a preverifier.

More hints here:

http://www.kevinboone.com/j2me.html
 
D

Darryl L. Pierce

Jacob said:
I know I can use the ktoolbar program to compile
code for the CDLC, but what is the javac equivalent?

I think it involves specifying -Xbootclasspath,
but I haven't found exactly how.

You specify the CLDC/MIDP jar files in your bootclasspath reference.

--
/**
* @author Darryl L. Pierce <[email protected]>
* @see The Infobahn Offramp <http://mcpierce.mypage.org>
* @quote "Lobby, lobby, lobby, lobby, lobby, lobby..." - Adrian Monk
*/
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,048
Latest member
verona

Latest Threads

Top