bin/setclasspath.bat rem --------------------------------------------------------------------------- rem Set CLASSPATH and Java options rem rem $Id: setclasspath.bat,v 1.6 2004/02/12 21:38:56 t Exp $ rem ---------------------------------------------------------------------------rem Make sure prerequisite environment variables are set if not "%JAVA_HOME%" == "" goto gotJavaHome echo The JAVA_HOME environment variable is not defined echo This environment variable is needed to run this program goto exit :gotJavaHome if not exist "%JAVA_HOME%\bin\java.exe" goto noJavaHome if not exist "%JAVA_HOME%\bin\javaw.exe" goto noJavaHome if not exist "%JAVA_HOME%\bin\jdb.exe" goto noJavaHome if not exist "%JAVA_HOME%\bin\javac.exe" goto noJavaHome goto okJavaHome :noJavaHome echo The JAVA_HOME environment variable is not defined correctly echo This environment variable is needed to run this program echo NB: JAVA_HOME should point to a JDK not a JRE goto exit :okJavaHomeif not "%BASEDIR%" == "" goto gotBasedir echo The BASEDIR environment variable is not defined echo This environment variable is needed to run this program goto exit :gotBasedir if exist "%BASEDIR%\bin\setclasspath.bat" goto okBasedir echo The BASEDIR environment variable is not defined correctly echo This environment variable is needed to run this program goto exit :okBasedirrem Set the default -Djava.endorsed.dirs argument set JAVA_ENDORSED_DIRS=%BASEDIR%\common\endorsedrem Set standard CLASSPATH rem Note that there are no quotes as we do not want to introduce random rem quotes into the CLASSPATH set CLASSPATH=%JAVA_HOME%\lib\tools.jarrem Set standard command for invoking Java. rem Note that NT requires a window name argument when using start. rem Also note the quoting as JAVA_HOME may contain spaces. set _RUNJAVA="%JAVA_HOME%\bin\java" set _RUNJAVAW="%JAVA_HOME%\bin\javaw" set _RUNJDB="%JAVA_HOME%\bin\jdb" set _RUNJAVAC="%JAVA_HOME%\bin\javac"goto end:exit exit 因为你设了java_home,所以他重新设置过classpath了:end
enjoy~~
具体原因见下
rem ---------------------------------------------------------------------------
rem Set CLASSPATH and Java options
rem
rem $Id: setclasspath.bat,v 1.6 2004/02/12 21:38:56 t Exp $
rem ---------------------------------------------------------------------------rem Make sure prerequisite environment variables are set
if not "%JAVA_HOME%" == "" goto gotJavaHome
echo The JAVA_HOME environment variable is not defined
echo This environment variable is needed to run this program
goto exit
:gotJavaHome
if not exist "%JAVA_HOME%\bin\java.exe" goto noJavaHome
if not exist "%JAVA_HOME%\bin\javaw.exe" goto noJavaHome
if not exist "%JAVA_HOME%\bin\jdb.exe" goto noJavaHome
if not exist "%JAVA_HOME%\bin\javac.exe" goto noJavaHome
goto okJavaHome
:noJavaHome
echo The JAVA_HOME environment variable is not defined correctly
echo This environment variable is needed to run this program
echo NB: JAVA_HOME should point to a JDK not a JRE
goto exit
:okJavaHomeif not "%BASEDIR%" == "" goto gotBasedir
echo The BASEDIR environment variable is not defined
echo This environment variable is needed to run this program
goto exit
:gotBasedir
if exist "%BASEDIR%\bin\setclasspath.bat" goto okBasedir
echo The BASEDIR environment variable is not defined correctly
echo This environment variable is needed to run this program
goto exit
:okBasedirrem Set the default -Djava.endorsed.dirs argument
set JAVA_ENDORSED_DIRS=%BASEDIR%\common\endorsedrem Set standard CLASSPATH
rem Note that there are no quotes as we do not want to introduce random
rem quotes into the CLASSPATH
set CLASSPATH=%JAVA_HOME%\lib\tools.jarrem Set standard command for invoking Java.
rem Note that NT requires a window name argument when using start.
rem Also note the quoting as JAVA_HOME may contain spaces.
set _RUNJAVA="%JAVA_HOME%\bin\java"
set _RUNJAVAW="%JAVA_HOME%\bin\javaw"
set _RUNJDB="%JAVA_HOME%\bin\jdb"
set _RUNJAVAC="%JAVA_HOME%\bin\javac"goto end:exit
exit
因为你设了java_home,所以他重新设置过classpath了:end
下面也不困难吧