| Author |
setting path variable
|
Jimmian Lin
Greenhorn
Joined: May 31, 2008
Posts: 16
|
|
Hi I am trying to set a path variable to the bin directory in the new Java folder I installed. However, my command prompt is still not recognizing the javac command outside of the bin folder. I double checked the path that I typed C:\Program Files.... etc and it seems to match precisely, down to the spaces and the capital letters, but the window still does not understand javac. Does anyone have any suggestions? Thanks
|
 |
Maneesh Godbole
Saloon Keeper
Joined: Jul 26, 2007
Posts: 8434
|
|
Check this out http://faq.javaranch.com/java/HowToSetTheClasspath
|
[Donate a pint, save a life!] [How to ask questions] [Onff-turn it on!]
|
 |
Jimmian Lin
Greenhorn
Joined: May 31, 2008
Posts: 16
|
|
|
I only saw a path variable, but no class path variable for some reason. So, should I be typing in the path variable the directory where my files are located instead of the bin directory?
|
 |
Jimmian Lin
Greenhorn
Joined: May 31, 2008
Posts: 16
|
|
|
Scratch the last message. I should be setting the class path variable to the folder containing my java files in addition to setting the path variable to the bin files?
|
 |
Maneesh Godbole
Saloon Keeper
Joined: Jul 26, 2007
Posts: 8434
|
|
My bad! Confused path for classpath. Path is for the java.exe and javac.exe. The folder where your class files are should be on the class path. By default the current directory is already on the class path.
|
 |
Campbell Ritchie
Sheriff
Joined: Oct 13, 2005
Posts: 32654
|
|
|
Don't set the CLASSPATH at all.
|
 |
 |
|
|
subject: setting path variable
|
|
|