why is SET JAVA_HOME in this bat file not overriding the environment variable JAVA_HOME?
someFile.bat
@ECHO OFF
SET JAVA_HOME = Progra~2\Java\jdk1.6.0_23
echo JAVA_HOME: %JAVA_HOME%
OUTPUT
JAVA_HOME: C:\Program Files (x86)\Java\jdk1.7.0_21
because of the additional space.Try this:
echo JAVA_HOME: %JAVA_HOME %
try to set the java_home like this:
SET "JAVA_HOME=Progra~2\Java\jdk1.6.0_23"