setclasspath.bat
上传用户:zhangkaihu
上传日期:2008-02-20
资源大小:3690k
文件大小:2k
- rem ---------------------------------------------------------------------------
- rem Set CLASSPATH and Java options
- rem
- rem $Id: setclasspath.bat,v 1.7 2004/07/26 15:34:31 yoavs 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%binjava.exe" goto noJavaHome
- if not exist "%JAVA_HOME%binjavaw.exe" goto noJavaHome
- if not exist "%JAVA_HOME%binjdb.exe" goto noJavaHome
- if not exist "%JAVA_HOME%binjavac.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
- :okJavaHome
- if 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%binsetclasspath.bat" goto okBasedir
- echo The BASEDIR environment variable is not defined correctly
- echo This environment variable is needed to run this program
- goto exit
- :okBasedir
- rem Set the default -Djava.endorsed.dirs argument
- set JAVA_ENDORSED_DIRS=%BASEDIR%commonendorsed
- rem 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%libtools.jar
- rem 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%binjava"
- set _RUNJAVAW="%JAVA_HOME%binjavaw"
- set _RUNJDB="%JAVA_HOME%binjdb"
- set _RUNJAVAC="%JAVA_HOME%binjavac"
- goto end
- :exit
- exit /b 1
- :end