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:
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="$PATH":/usr/local/jdk1.6.0/bin
- export PATH (2.和3.可合并为export PATH=
"$PATH":/usr/local/jdk1.6.0/bin
(我的情况为
export PATH="$PATH":/root/jdk1.7.0_03/bin )
- Save and close the file
- Open new Terminal window
- Verify the PATH is set properly
# java -version (from http://www.java.com/en/download/help/path.xml,http://docs.oracle.com/javase/tutorial/essential/environment/paths.html)
No comments:
Post a Comment