Pat, I'm going to move this to our Java In General (Beginner) forum where classpath and javac issues are discussed. While you're waiting for answers, you might want to check our our FAQ for that forum. It has lots of tips for doing this.
Originally posted by pat foran: my professor said make sure you set the classpath first...
Set it to what? Do you have third-party classes stored somewhere?
Joined: Sep 07, 2007
im sorry but i have no idea what that means all i know is this is a computer programming class and my professor said that this is the most basic class but i have no files saved before this the text book came with the software which i installed and now im on the OS prompt and the book says i need to set the class and classpath options which i dont know how to do...sorry if i confuse you with this
Okay. Let's make sure the PATH is set, and then figure out whether you need a CLASSPATH.
1) What operating system are you running?
2) Do you know what exactly you installed from the CD?
3) Have you downloaded/installed anything from java.sun.com?
Joined: Sep 07, 2007
ummi just installed java standard edition 6 i believe and i didnt download anything else. and i havent set up anything yet. ive tried to type set classpath=. in the OS prompt but it wont do anything. that is what the book tells me to do but it just doesnt work
If you can't remember where you installed Java, try a search for the javac file. It might be hidden, and lives in various places: in Windows I have it in
and on Linux (I think)
Look at this website about common problems from the Java tutorial. The first problem appears to be what you describe, and (as Marc Weber and Jesper Young have already said) is most likely that you need to add the location of java, javac, etc to the PATH. There is a link to setting the PATH on that website.
That appears to be for Windows. If you are using an old version of Windows, come back to us. If you are using Linux, you write something like
export PATH=/usr/java/jdk1.6.0_01/bin/:$PATH and return on a shell/terminal and the PATH will remain set until you close that shell. You can also edit the .bashrc or a similar file on Linux with a text editor, remembering to keep a backup copy of the original text just in case!
You will probably find the program works nicely once you have the PATH set up.
Good luck. CR Minor spelling corrections[/edit] [ September 09, 2007: Message edited by: Campbell Ritchie ]