What do I put in the system variable PATH for Java commands?

Palidrome

Honorable
Jan 21, 2013
38
0
10,530
I want to set up a server using java on my new computer that I built, but my computer doesn't recognize any Java commands even though I re-installed it twice. SO I looked at Java's tutorial, but they did not mention the location of the class or were to find the location of the class. I might not understand what they mean (Because I'm 13). But I'm staring at the Variable value slot thinking I wonder what goes here, so please help.
Thank you for reading my question.
 
Solution
@Palidrome,

Open Windows Explorer. In the search box, enter "Java.exe" (without quotes), and see which folder this file resides in. Enter that folder at the PATH command.
(assuming you're in Windows)
Open Control Panel, System, Advanced, and click on Environment Variables
In "User Variables", add (or edit, if it's already there) PATH variable to read
PATH=%PATH%;<full path to folder where you have installed Java>
e.g. PATH=%PATH%;"C:\Program Files\Oracle\Java\JDK". You might need to log-off / log-on for changes to take effect.
To confirm it works - open Command prompt, and type "JAVA". You should get it display something.
And boy, keep on going!
 

Palidrome

Honorable
Jan 21, 2013
38
0
10,530
Also I tried what you put for the variable value, and I restarted but didn't work. I was a little bit confused by what you meant by PATH=%PATH% is that the new variable name?
 
Hi

can you explain what you mean by
'I want to set up a server using java on my new computer'

what server program ?

what java commands ?

answer this an some one may be able to see why you are having problems

also what version of java did you install (give file name)
There is a developers version and runtime version which most people use
(as well as 32 bit & 64 bit versions, most people just need the 32 bit version)

the Java 7 runtime on a 32 bit windows is installed by default c:\Program Files\Java\jre7\bin

regards

Mike Barnes
 
I am not a Java expert (in fact, I hate it and don't use it unless absolutely necessary, and then I go to Linux version), so I just downloadd latest JDK v7.11, and started the installation. The default path offered is
C:\Program Files\Java\jdk1.7.0_11\
so the PATH variable would look
%PATH%;"C:\Program Files\Java\jdk1.7.0_11\
So, to find the exact path - open your Windows Explorer, navigate to C:\Program Files, and drill down until you find something looking like JDK. If your windows is 64-bit version, you have to download 64-bit version of Java as well.
 
Check to see whether this path actually exists. There is a chance that JAVA.EXE is within a folder of JDK folder (like BIN), so you might have to append "bin\" to the above path.
If you still cannot figure it out - open Windows explorer at the above path, set view to "List" (so we can see as many files as possible), and put another screenshot.
 
Hi

c:\program files (X86)\Java\

looking at your picture that is the location for the 32bit version of programs on a Windows 64 bit system
[64 bit program files go in c:\program files\Java on a 64 bit system]


on my 32bit Windows & Java version of JRE
C:\program files\Java\jre7\bin is where the executable programs and dlls are located so would be in the %path%
eg
C:\program files\Java\jre7\bin\Java.exe


regards

Mike Barnes