1 | rem ---------------------------------------------------------------------------
|
---|
2 | rem Set CLASSPATH and Java options
|
---|
3 | rem
|
---|
4 | rem $Id: setclasspath.bat 11288 2006-02-17 03:59:41Z kjdon $
|
---|
5 | rem ---------------------------------------------------------------------------
|
---|
6 |
|
---|
7 | rem Make sure prerequisite environment variables are set
|
---|
8 | if not "%JAVA_HOME%" == "" goto gotJavaHome
|
---|
9 | echo The JAVA_HOME environment variable is not defined
|
---|
10 | echo This environment variable is needed to run this program
|
---|
11 | goto exit
|
---|
12 | :gotJavaHome
|
---|
13 | if not exist "%JAVA_HOME%\bin\java.exe" goto noJavaHome
|
---|
14 | if not exist "%JAVA_HOME%\bin\javaw.exe" goto noJavaHome
|
---|
15 | if not exist "%JAVA_HOME%\bin\jdb.exe" goto noJavaHome
|
---|
16 | if not exist "%JAVA_HOME%\bin\javac.exe" goto noJavaHome
|
---|
17 | goto okJavaHome
|
---|
18 | :noJavaHome
|
---|
19 | echo The JAVA_HOME environment variable is not defined correctly
|
---|
20 | echo This environment variable is needed to run this program
|
---|
21 | echo NB: JAVA_HOME should point to a JDK not a JRE
|
---|
22 | goto exit
|
---|
23 | :okJavaHome
|
---|
24 |
|
---|
25 | if not "%BASEDIR%" == "" goto gotBasedir
|
---|
26 | echo The BASEDIR environment variable is not defined
|
---|
27 | echo This environment variable is needed to run this program
|
---|
28 | goto exit
|
---|
29 | :gotBasedir
|
---|
30 | if exist "%BASEDIR%\bin\setclasspath.bat" goto okBasedir
|
---|
31 | echo The BASEDIR environment variable is not defined correctly
|
---|
32 | echo This environment variable is needed to run this program
|
---|
33 | goto exit
|
---|
34 | :okBasedir
|
---|
35 |
|
---|
36 | rem Set the default -Djava.endorsed.dirs argument
|
---|
37 | set JAVA_ENDORSED_DIRS=%BASEDIR%\common\endorsed
|
---|
38 |
|
---|
39 | rem Set standard CLASSPATH
|
---|
40 | rem Note that there are no quotes as we do not want to introduce random
|
---|
41 | rem quotes into the CLASSPATH
|
---|
42 | set CLASSPATH=%JAVA_HOME%\lib\tools.jar;%CLASSPATH%
|
---|
43 |
|
---|
44 | rem Set standard command for invoking Java.
|
---|
45 | rem Note that NT requires a window name argument when using start.
|
---|
46 | rem Also note the quoting as JAVA_HOME may contain spaces.
|
---|
47 | set _RUNJAVA="%JAVA_HOME%\bin\java"
|
---|
48 | set _RUNJAVAW="%JAVA_HOME%\bin\javaw"
|
---|
49 | set _RUNJDB="%JAVA_HOME%\bin\jdb"
|
---|
50 | set _RUNJAVAC="%JAVA_HOME%\bin\javac"
|
---|
51 |
|
---|
52 | goto end
|
---|
53 |
|
---|
54 | :exit
|
---|
55 | exit /b 1
|
---|
56 |
|
---|
57 | :end
|
---|