JAVA_HOME is an environment variable which should point to the root directory of the JDK installation.
JAVA_HOME is an environment variable which indicates the directory where the Java Development Kit (JDK) software is installed.
Setting JAVA_HOME depends on the operating system:
UNIX
Korn and bash shells:
export JAVA_HOME=jdk-install-dir export PATH=$JAVA_HOME/bin:$PATH
Bourne shell:
JAVA_HOME=jdk-install-dir export JAVA_HOME PATH=$JAVA_HOME/bin:$PATH export PATH
C shell:
setenv JAVA_HOME jdk-install-dir setenv PATH $JAVA_HOME/bin:$PATH export PATH=$JAVA_HOME/bin:$PATH
Windows
- Right click My Computer > Properties > Advanced system settings
- On the Advanced tab, select Environment Variables..., and then add/edit JAVA_HOME to point to where the JDK software is located, for example, C:\Program Files\Java\jdk1.8.0_60.
or
- Go to Control Panel\All Control Panel Items\User Accounts using Explorer
- Click on Change my environment variables
- Add/edit the JAVA_HOME variable to point to where the JDK software is located