I'm trying to run the basic "Hello, world!" java file but keep getting errors. My first question is, does it matter if I have both J2SE Development Kit 5.0 and Java 22.214.171.124 since I'll be specifying the file path in the command prompt?
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.
Well, I have the file saved on my desktop as Hello.java and when I type "javac Hello.java" I get an error saying, "Javac is not recognized as an internal or external command..." 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. And does it matter if when I click on the properties of my saved file the type of file says, "jGRASP Java file"?
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.
Let's say I have my javac in drive C:\Program Files\Java\jdk1.5.0\bin (and javac is in the bin file) but I have my Hello.java saved under C:\Documents and Settings\Juliet\Desktop...if my current path says, "%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\Program Files\QuickTime\QTSystem\" then I just add the C:\Program Files\Java\jdk1.5.0\bin to it? Or do I delete the part of the path that says, "\QuickTime\QTSystem\ and replace that with "\Java\jdk1.5.0\bin ?
Just add a ";" at the end of your path and then tell the computer where you have the bin directory installed on your machine. Do NOT delete the rest of your path variable or other things may stop working.
So now that I have the path updated I am to open the command prompt. Currently my command prompt is directed to C:\Documents and Settings\Juliet.
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"?