JAVA_HOME variable JAVA_HOME variable windows windows

JAVA_HOME variable


If your Java installation directory has a space in its path name, you should use the shortened path name (e.g. C:\Progra~1\Java\jre6) in the environment variable instead.

  • Progra~1 = 'Program Files'
  • Progra~2 = 'Program Files(x86)'

Setting the JAVA_HOME Variable in Windows


Try setting it to

JAVA_HOME=C:\Program Files (x86)\Java\jdk1.7.0\jre


When you want to use JAVA_HOME in your path variable it is recommended to use "%JAVA_HOME%\bin" instead of %JAVA_HOME%\bin .