System Path Variable

What is the PATH Variable?

PATH is an environment variable specifying a set of directories where executable programs are located. Programs on the PATH are accessible via the terminal without having to specify the full file path to the file.

For example to execute rbnb.jar through Java without specifying Java on the PATH you would type into the terminal:

C:\Program Files\Java\jre7\bin\java.exe -jar rbnb.jar

But if we add C:\Program Files\Java\jre7\bin\ to the PATH, all the files in the bin directory will be accessible from the command line just via typing their name:

java -jar rbnb.jar

Adding a Directory to the PATH

  • Windows 7
    1. Select Computer from the Start menu
    2. Choose System Properties from the context menu
    3. Click Advanced system settings > Advanced tab
    4. Click on Environment Variables, under System Variables, find PATH, and click on it.
    5. In the Edit windows, modify PATH by adding the location of the class to the value for PATH. If you do not have the item PATH, you may select to add a new variable and add PATH as the name and the location of the class as the value.
  • Windows XP
    1. Start -> Control Panel -> System -> Advanced
    2. Click on Environment Variables, under System Variables, find PATH, and click on it.
    3. In the Edit windows, modify PATH by adding the location of the class to the value for PATH. If you do not have the item PATH, you may select to add a new variable and add PATH as the name and the location of the class as the value.
  • Windows Vista
    1. Right click My Computer icon
    2. Choose Properties from the context menu
    3. Click Advanced tab (Advanced system settings link in Vista)
    4. In the Edit windows, modify PATH by adding the location of the class to the value for PATH. If you do not have the item PATH, you may select to add a new variable and add PATH as the name and the location of the class as the value.
  • Setting Path on Solaris and LinuxNote: We are here giving instructions for two most popular Shells on Linux and Solaris.
    Please visit link below if you are using any other shells.For bash Shell:

    1. Edit the startup file (~/ .bashrc)
    2. Modify PATH variable:
      PATH=/Desired/File/Path
    3. export PATH
    4. Save and close the file

    For C Shell (csh):

    1. Edit startup file (~/ .cshrc)
    2. Set Path
      set path=(/Desired/File/Path )
    3. Save and Close the file
Open Source DataTurbine Initiative © 2017 Frontier Theme