Please give more details of the errors; does the compiler run, does the code compile, and if so, does it run?
I think you are making life unnecessarily difficult for yourself setting the PATH from the command line; set the path permanently (there are links from the common problems page) and you won't need to do it until you upgrade your Java installation.
You ought not to have any difficulty having two versions installed; you are simply using whichever appears first in your PATH and ignoring the other.
C:\Documents and Settings\Juliet>cd desktop
C:\Documents and Settings\Juliet\Desktop>javac Hello.java
'javac' is not recognized as an internal or external command,
operable program or batch file.
To my understanding that error message is saying it's not recognizing the path where the file is saved, correct? If so I don't get it since I'm clearly stating the path in the command prompt.
No. It's not complaining about the java file. It's windows complaining that "javac" (the java compiler) is not found in the path specified.
Originally posted by Julie Nelson:
So if the javac is in a different path how do I get it to work with a file that's in another path? Do I type both paths, combined in one line, for it to register?
Well, that's one way to do it. Another way is to add it to Window's PATH -- just like with all the other programs you installed on Windows.
Then all I do is add what's below:
So the end result will look like the following?
%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\Program Files\QuickTime\QTSystem\;C:\Program Files\Java\jdk1.5.0\bin
If you would rather use the Java 1.6 version, then specify that location instead of the Java 1.5 path. (The PATH is checked from left to right, and your system will use the first one that works.)
Am I supposed to change that so it points to the direction of the Hello.java file, which would be C:\Documents and Settings\Juliet\Desktop (since I saved the file to my desktop) and once that's set will I type in the "javac.Hello.java"?