Total Pageviews

Sunday, 1 April 2012

how to set java's PATH variable?

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:

  1. Edit the startup file (~/ .bashrc)
  2. Modify PATH variable:
    PATH="$PATH":/usr/local/jdk1.6.0/bin
  3. export PATH (2.和3.可合并为export PATH="$PATH":/usr/local/jdk1.6.0/bin  (我的情况为export PATH="$PATH":/root/jdk1.7.0_03/bin )
  4. Save and close the file
  5. Open new Terminal window
  6. 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