Child pages
  • Setting the JAVA_HOME environment variable

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

The procedure to set the JAVA_HOME environment variable differs on different platforms:

Windows
  • Open System Properties (right-click "My computer" and select "Properties")
  • Open "Advanced" tab
  • Click "Environment Variables"
  • Locate the "JAVA_HOME" system variable and click "Edit"
  • Set the value of the variable to the path of the Java installation, for example: "C:\Progra~1\Java\jre1.6.0_17"
Macintosh
Code Block
titleSet JAVA_HOME variable for OSX
setenv JAVA_HOME /System/Library/Frameworks/JavaVM.framework/Home
Unix

Depending on the used shell:

Code Block
titleSet JAVA_HOME variable for 'tcsh'
setenv JAVA_HOME="/usr"
Code Block
titleSet JAVA_HOME variable for 'bash' (directory is default for the Debian and Ubuntu apt-get package)
declare -x JAVA_HOME="/usr"
Note
titleJava Home directory

The JAVA_HOME environment directory may be different on every distribution.