This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

V.New and in need of assistance

 
Jen McDermott
Greenhorn
Posts: 4
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi there, I've just started to program using J2ME and I'm already stuck I've been using the book J2ME game programming and so its been looking pretty useful, but I've already run into a problem I can't seem to work out.
I've downloaded all the bits and bobs from the sun website and everything seems to be set up ok, but when I try to compile my first program using the command line javac command I get a message telling me javac isn't a recognised internal or external command.
I'm using windows xp, and have the WTK2.1, Midp 1.0 and CLDC 1.0.
Can somebody please help, I'm new at this but eager to get started and I seem to fallen at the the first hurdle.
 
Fred Grott
Ranch Hand
Posts: 346
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
okay you need to change yoru screen name to reflect naming rules here at this forum..

What directory are you in when attempting the command?

and what command line sequence are you using??
 
Mark Spritzler
ranger
Sheriff
Posts: 17276
6
IntelliJ IDE Mac Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"Jen"-
Welcome to the JavaRanch! Please adjust your displayed name to meet the

JavaRanch Naming Policy.

You can change it

here.

Thanks! and welcome to the JavaRanch!

Mark
 
Tomas Conway
Ranch Hand
Posts: 45
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you are new to Java (pardon me if you're not) then you may not have downloaded a Java Development Kit (JDK). You can get this from Sun's website too. I'd go for one of the 1.4.x versions, I think there's some difficulties with J2ME on 1.5/5.0.


If you have a JDK installed already then you may want to add the bin directory to your PATH. Alternatively you can call 'javac' directly by specifying the full pathname. E.g. instead of

javac ...

type

C:\Program Files\Java\jdk1.4.2\bin\javac ...
 
Mark Spritzler
ranger
Sheriff
Posts: 17276
6
IntelliJ IDE Mac Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well there are two suggestion.

1. setup your path environment variable in Window to include your sdk bin directory.

2. The Wireless Toolkit can also compile your code. wtkdir\apps\YourAppDirectory\YourJavaFiles. Then start the Toolkit, select your App and choose compile. That's how I compile my J2ME stuff, rather than using the command line.
 
Jen McDermott
Greenhorn
Posts: 4
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the advice all. Sry about the name, my bad . I'll try the suggestions and let you know.
 
Jen McDermott
Greenhorn
Posts: 4
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok adding the bin file to the path sorted that one out, thanks !

The next step was to preverify the class file, but when I entered the command it just kept telling me the usages of preverify, like I hadn't even entered any of the rest of it.

Here's the command line I'm using:
preverify -cldc -classpath %MIDP_HOME%\classes;. -d .hello

I'm in the right directory and I'm sure that should work. It's so frustrating to be having so many problems early on
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic