I was able to compile and run the HelloWorldApp, but to compile it I had to specify the entire path:
I understand that if I update the PATH variable, I won't have to specify the entire path every time I run the JDK executables.
To update the PATH variable, I followed the instructions from the installation notes. However, I had to add the PATH variable to both User Variables and System Variables...I simply chose 'New', named the variable 'PATH', and set the value to be 'C:\Java\jdk1.6.0_06\bin'. I did this for both User and System Variables.
I STILL have to specify the entire path in order to compile and run...what did I do wrong? Also, what's the difference between the PATH var. and the CLASSPATH var? I noticed that the value for my CLASSPATH var. (which is only under System Variables, not User Variables) is for an older JRE folder:
What should I update this value to? (the current version of JRE I have installed, JRE1.6.0_06, does not have an 'ext' directory, or any equivalent QTJava file) I'm sorry for such a long question, but I would REALLY appreciate any help!!
"Kuldeep withDreams", please check your private messages. You can see them by clicking My Private Messages.
Yong: I'm not sure how this works on Windows (I use Linux most of the time), but yes, probably it's repeated because you put it in the User as well as in the System variables. You only need to put it in one of those two places (User if you want it for your login only, or System if you want to set it for all people who might use your computer).
CLASSPATH tells Java where to look for class files. Normally, with newer Java versions, you don't need to set it; Java will look for class files in the current directory if it's not set. You can also specify the classpath on the command line instead of as an environment variable, for example:
Thank you, Jesper, for your reply. I do have another question:
If the CLASSPATH variable tells Java where to look for class files, does that mean you can put .java files in different directories (other than the directory where your Java excutables: javac, etc) are located? If you do this, how do you compile...in other words, how would you compile a .java file that's located in a directory other than the current directory? Is it a bad practice to do this? Thanks!