2013年7月2日 星期二

set Sun JDK PATH in Linux

below copy from Oracle web site

To Set PATH on Linux


Steps
  1. Change to your home directory.
    cd $HOME
  2. Open the .bashrc file.
  3. Add the following line to the file. Replace the JDK directory with the name of your java installation directory.
    export PATH=/usr/java//bin:$PATH
  4. Save the file and exit.
    Use the source command to force Linux to reload the .bashrc file which normally is read only when you log in each time.
    source .bashrc

    Note – Note that if you wish to set the PATH for all users, you need to log in as root in the bash shell and perform the above steps on the .profile file in the etc directory and not the .bashrc file in the home directory.

沒有留言:

張貼留言

追蹤者