wood burning stoves 2.0*
The moose likes Java Micro Edition and the fly likes V.New and in need of assistance Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Mobile » Java Micro Edition
Bookmark "V.New and in need of assistance" Watch "V.New and in need of assistance" New topic
Author

V.New and in need of assistance

Jen McDermott
Greenhorn

Joined: Jan 24, 2005
Posts: 4
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

Joined: Oct 05, 2002
Posts: 346
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??


MobileBytes blog - Sharing Technology - My Programming Knols
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17249
    
    6

"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


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
Tomas Conway
Ranch Hand

Joined: Nov 02, 2004
Posts: 45
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

Joined: Feb 05, 2001
Posts: 17249
    
    6

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

Joined: Jan 24, 2005
Posts: 4
Thanks for the advice all. Sry about the name, my bad . I'll try the suggestions and let you know.
Jen McDermott
Greenhorn

Joined: Jan 24, 2005
Posts: 4
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
 
subject: V.New and in need of assistance
 
Similar Threads
Trouble running first application
Class Path Problem with windows 7
Head First book "% javac"
running java from the command prompt window
setting up java environment