View Single Post
Old 02-03-2007, 04:51 AM   #2 (permalink)
Belisarius
Java fanboy
 
Belisarius's Avatar
 
Join Date: Aug 2003
Posts: 1,139
Belisarius is on a distinguished road
It's not in your PATH. The reason you can run "java" is because Windows installs the JRE by default, and so it's already available to you - you need to point Windows to the new install.

First find out where the copy you downloaded installed to. Usually it's in "C:\Program Files\Java". For instance, I have a copy of 1.5 on my machine, and it's installed in "C:\Program Files\Java\jdk1.5.0_06". Underneath that directory there is a "bin" directory. That is where Java keeps it's commands like "java" and "javac".

Next, right click on My Computer, go to Properties, click on the Advanced tab, and click on the Environmental Variables button. In the System Variables section, modify the "Path" variable to include that "bin" directory from before.

Also, to save yourself headaches in the future, make sure the CLASSPATH variable exists and includes ".", a period. It might contain other things, but make sure it contains that period, otherwise you'll have problems running your java programs.
__________________
GitS
Belisarius is offline   Reply With Quote