Set Path For Java in Windows XP

To run a Java program you need to save the .java file in the bin directory otherwise you can't run the program without setting up the path to the bin. This is necessary because the Java Compiler, Java Application Launcher, etc. reside in the bin folder.

Several steps are there involving in setting path permanently for Java

Step 1: Click on Start Menu ->> Right Click on My Computer ->> Select Properties
set path 
Now, you'll see the System Properties window as shown in following image.

Step 2: Select Advanced tab.
set path in java 
Step 3: Click on Environment Variables button.
java path 
Now, another window is popped up as shown in the following image:
set java path in xp 
Step 4: Select variable Path and press Edit button. 
set java path 
Edit System Variable window is shown, as follows:
java path 
Step 5: Add a semicolon ( ; ) and then your path to bin folder (can be find it in the Installation Directory which is specified at the time of installation of JDK) at the end of variable value.
set path 
Press OK
Hurray!!! You have set-up the path.