Javac command not working | how to setup java environment path variable

Setup Java Path Settings in Windows XP



  • Java installed on your system.


  1. First note down where your Java software installed. Go there and copy the path upto bin folder of JDK...

    Like this.. C:\Program Files\Java\jdk1.6.0_13\bin

    Note: Your actual path may vary.. This is just an example.

  2. Right click on your My Computer and select Properties. A window will appear.
  3. Choose Advanced tab from that window.
  4. Click on  Environment Variables button located at the bottom of that window. That will bring a new Envrionment Variables window.
  5. Double click on path variable located at System Variables as shown in below figure. This will give you a small box type window.
  6. In that box, go to Variable Value, and put a semicolon ( ; ) at the end of that value.
    Now paste here the java/bin path you have copied.( e.g.C:\Program Files\Java\jdk1.6.0_13\bin)

    It will look something like this. ..SystemRoot%;%SystemRoot%\System32\Wbem;C:\Program Files\Java\jdk1.6.0_13\bin

  7. Now click.. OK.. OK.. and OK..  Thats it..

    Now open the command prompt and type in javac.. if you see some java commands.. your path setting is success...