• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

setting path variable

 
Jimmian Lin
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 11164
14
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
 
Jimmian Lin
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 11164
14
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 50168
79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Don't set the CLASSPATH at all.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic