Setting the "PATH" environment variable

The process of setting up the "PATH" environment variable depends upon your operating system. You must check the documentation of your operating system, before setting up the "PATH" environment variable. However, for those, who are unable to get any such information, the procedure is outlined below:

For Windows 9x and its successors:

  1. Locate the file Autoexec.bat on your system.

  2. Most probably you will find this file in primary partition containing the Windows dir.

  3. Copy this file to another location so that you can restore it in case anything goes wrong.

  4. Now open the file in an ASCII editor like notepad.

  5. Locate the PATH statement in this file.

  6. The Path statement might look like this: PATH=c:\windows; c:\windows\command. COM

  7. Start by appending a semicolon at the end of the path statement.

  8. Locate the folder which contains java.exe.

  9. Typically it will be c:\jdk1.2\bin or c:\progra~1\javasoft\JRE\1.2\bin

  10. Note that the progra~1 stands for the program files folder.

  11. Type a space after the semicolon you appended to the PATH statement.

  12. After the space append the path of folder containing java.exe to the PATH statement.

  13. Finally your path statement might look like this:

        PATH=C:\windows; c:\windows\command.com; c:\jdk1.2\bin   

After modifying the path statement, save the file autoexec.bat and reboot your system for changes to take effect. if however, your autoexec.bat doesn't contains a PATH statement, just type PATH= followed by the folder name that contains the java interpreter, save the file and reboot your system.

Note that extra spaces are not allowed in the PATH statement. So be careful while typing in your PATH statement.

For Windows NT, Windows 2000, or Windows XP:

  1. Right click the My computer icon on your desktop

  2. In the right click menu that appears select "Properties" and click again

  3. You will be presented with a window titled "System properties"

  4. In the "System properties" window select the "Advanced" tab and click.

  5. In the window that appears now locate the button "Environment variables"

  6. Click on the button titled "Environment variables".

  7. Look for the table titled "System variables" in the window that appears.

  8. Select the variable "PATH" and click on the "EDIT" button.

  9. A small window will appear now containing the PATH in highlighted mode.

  10. DO NOT TYPE IN ANYTHING NOW.

  11. Press the right arrow key carefully. Now, type a semicolon.

  12. After the semicolon type the path to the folder containing java interpreter (java.exe)

  13. Press the "OK" button to save this new  PATH and exit.

  14. Close all the windows and exit.

  15. Reboot your system for changes to take effect.

 

Back  TOC  Next