How do I set or change the PATH system variable? - Print-friendly Page
How do I set or change the PATH system variable? - Print-friendly Page
February 05, 2012
How do I set or change the PATH system variable?
This article applies to: Platform(s): Solaris SPARC, Solaris x86, Red Hat Linux, SUSE Linux, Windows 7, Vista, Windows XP
MORE TECHNICAL INFORMATION
The PATH is the system variable that your operating system uses to locate needed executables from the command line or Terminal window. The PATH system variable can be set using System Utility in control panel on Windows, or in your shell's startup file on Linux and Solaris.
SOLUTION
Setting Path on Windows
Windows 7
Select Computer from the Start menu Choose System Properties from the context menu Click Advanced system settings > Advanced tab Click on Environment Variables, under System Variables, find PATH, and click on it. 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. Reopen Command prompt window, and run your java code.
Windows XP
Start -> Control Panel -> System -> Advanced Click on Environment Variables, under System Variables, find PATH, and click on it. 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. Close the window. Reopen Command prompt window, and run your java code.
Windows Vista
Right click My Computer icon Choose Properties from the context menu
1 of 2
2/5/2012 3:05 PM
How do I set or change the PATH system variable? - Print-friendly Page
Click Advanced tab (Advanced system settings link in Vista) 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. Reopen Command prompt window, and run your java code.
Setting Path on Solaris and Linux
To find out if the java executable is in your PATH, execute: % java -version
This will print the version of the java executable, if it can find it. If you get error java: Command not found. Then path is not properly set.
To find out which java executable the first one found in your PATH, execute: % which java
Below are the steps to set the PATH permanently, Note: 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. Path Setting Tutorial ()
For bash Shell:
Edit the startup file (~/ .bashrc) Modify PATH variable: PATH=/usr/local/jdk1.6.0/bin export PATH Save and close the file Open new Terminal window Verify the PATH is set properly % java -version
For C Shell (csh):
Edit startup file (~/ .cshrc) Set Path set path=(/usr/local/jdk1.6.0/bin ) Save and Close the file Open new Terminal window Verify the PATH is set properly % java -version
2 of 2
2/5/2012 3:05 PM
................
................
In order to avoid copyright disputes, this page is only a partial summary.
To fulfill the demand for quickly locating and searching documents.
It is intelligent file search solution for home and business.
Related download
- command line crash course computer village
- chapter 21 windows 10 city university of new york
- 1 setting up your environment
- shell scripting and system variables purdue university
- stm32cubeide installation guide user manual
- slj setup a local development environment for windows oracle
- mmaavveenn eennvviirroonnmmeenntt sseettuupp tutorials point
- instructions for windows os users gonzaga university
- tutorial for windows and macintosh local blast gene codes corporation
- 2021 4 24 microsoft
Related searches
- how do i change my computer password
- how do i set up microsoft account
- how do i change my email password
- how do i set up email account
- how do i print screen
- how do i change my background
- how do i change password on outlook
- how do i print from my computer
- how do i print document
- how do i change my logon password
- how do i print double sided
- how do i set up my email account