Meaningless Drivel is fun!
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
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Installation envrironment variables Windows" Watch "Installation envrironment variables Windows" New topic

Installation envrironment variables Windows

Joseph Blackriver

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.


Roll with punchers, there is always tomorrow.
Techie Blog --
Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10825

Check this out

[How to ask questions] [Donate a pint, save a life!] [Onff-turn it on!]
I agree. Here's the link:
subject: Installation envrironment variables Windows
It's not a secret anymore!