This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Beginning Java and the fly likes Installation envrironment variables Windows Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Installation envrironment variables Windows" Watch "Installation envrironment variables Windows" New topic
Author

Installation envrironment variables Windows

Joseph Blackriver
Greenhorn

Joined: Aug 20, 2009
Posts: 1
Hello, this is my first post. I am happy to have found this place because Java is such a complex topic (at least for beginners) and it's nice to have someone friendly to go to when things don't work.

My question is very basic. I just want to understand why the CLASSPATH variable is needed, if at all. I've noticed that some JDK installation tutorials include the setting of this variable and others don't. Why is this? Should this variable be set up automatically when executing the installation program?

Also, I am running Windows Vista and see two Path variables in the environment variables dialog window. One under System and the other under User. What is the difference here? Should the env variables that Windows OS uses be put in the System Path variable and all the others on the User one?

Thanks for your help!
Tanzy Akhtar
Ranch Hand

Joined: Jul 19, 2009
Posts: 110
Welcome to javaranch, Joseph

Well, if you use lower version of jdk (3.0 or less) then you will surely come to know the real difference between
path and classpath.

In lower version, if you dont define PATH then by default the "java" command is only available to default folder
of jdk installation i.e. bin.

Now, if you dont't provide CLASSPATH, then java will only read the clasess from bin of jdk installation.

Now in higher version it does not need to to set CLASSPATH, just set PATH and enjoy using java.


Thanks,
Tanzy.


Roll with punchers, there is always tomorrow.
Techie Blog -- http://jtanzy.blogspot.com/
Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10268
    
    8

Check this out
http://faq.javaranch.com/java/HowToSetTheClasspath


[How to ask questions] [Donate a pint, save a life!] [Onff-turn it on!]
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Installation envrironment variables Windows