source: greenstone3/branches/customizingGreenstone3/resources/tomcat/setclasspath.bat@ 15191

Last change on this file since 15191 was 15191, checked in by dmn, 16 years ago

updating branch from trunk

  • Property svn:keywords set to Author Date Id Revision
File size: 2.2 KB
Line 
1rem ---------------------------------------------------------------------------
2rem Set CLASSPATH and Java options
3rem
4rem $Id: setclasspath.bat 15191 2008-04-14 04:20:45Z dmn $
5rem ---------------------------------------------------------------------------
6
7rem Make sure prerequisite environment variables are set
8if not "%JAVA_HOME%" == "" goto gotJdkHome
9if not "%JRE_HOME%" == "" goto gotJreHome
10echo Neither the JAVA_HOME nor the JRE_HOME environment variable is defined
11echo At least one of these environment variable is needed to run this program
12goto exit
13
14:gotJreHome
15if not exist "%JRE_HOME%\bin\java.exe" goto noJavaHome
16if not exist "%JRE_HOME%\bin\javaw.exe" goto noJavaHome
17if not ""%1"" == ""debug"" goto okJavaHome
18echo JAVA_HOME should point to a JDK in order to run in debug mode.
19goto exit
20
21:gotJdkHome
22if not exist "%JAVA_HOME%\bin\java.exe" goto noJavaHome
23if not exist "%JAVA_HOME%\bin\javaw.exe" goto noJavaHome
24if not exist "%JAVA_HOME%\bin\jdb.exe" goto noJavaHome
25if not exist "%JAVA_HOME%\bin\javac.exe" goto noJavaHome
26if not "%JRE_HOME%" == "" goto okJavaHome
27set JRE_HOME=%JAVA_HOME%
28goto okJavaHome
29
30:noJavaHome
31echo The JAVA_HOME environment variable is not defined correctly
32echo This environment variable is needed to run this program
33echo NB: JAVA_HOME should point to a JDK not a JRE
34goto exit
35:okJavaHome
36
37if not "%BASEDIR%" == "" goto gotBasedir
38echo The BASEDIR environment variable is not defined
39echo This environment variable is needed to run this program
40goto exit
41:gotBasedir
42if exist "%BASEDIR%\bin\setclasspath.bat" goto okBasedir
43echo The BASEDIR environment variable is not defined correctly
44echo This environment variable is needed to run this program
45goto exit
46:okBasedir
47
48rem Set the default -Djava.endorsed.dirs argument
49set JAVA_ENDORSED_DIRS=%BASEDIR%\common\endorsed
50
51rem Set standard CLASSPATH
52rem Note that there are no quotes as we do not want to introduce random
53rem quotes into the CLASSPATH
54set CLASSPATH=%JAVA_HOME%\lib\tools.jar;%CLASSPATH%
55
56rem Set standard command for invoking Java.
57rem Note that NT requires a window name argument when using start.
58rem Also note the quoting as JAVA_HOME may contain spaces.
59set _RUNJAVA="%JRE_HOME%\bin\java"
60set _RUNJAVAW="%JRE_HOME%\bin\javaw"
61set _RUNJDB="%JAVA_HOME%\bin\jdb"
62set _RUNJAVAC="%JAVA_HOME%\bin\javac"
63
64goto end
65
66:exit
67exit /b 1
68
69:end
Note: See TracBrowser for help on using the repository browser.