source: nutchez-0.1/tomcat/bin/setclasspath.bat @ 98

Last change on this file since 98 was 66, checked in by waue, 16 years ago

NutchEz - an easy way to nutch

File size: 3.2 KB
Line 
1@echo off
2rem Licensed to the Apache Software Foundation (ASF) under one or more
3rem contributor license agreements.  See the NOTICE file distributed with
4rem this work for additional information regarding copyright ownership.
5rem The ASF licenses this file to You under the Apache License, Version 2.0
6rem (the "License"); you may not use this file except in compliance with
7rem the License.  You may obtain a copy of the License at
8rem
9rem     http://www.apache.org/licenses/LICENSE-2.0
10rem
11rem Unless required by applicable law or agreed to in writing, software
12rem distributed under the License is distributed on an "AS IS" BASIS,
13rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14rem See the License for the specific language governing permissions and
15rem limitations under the License.
16
17rem ---------------------------------------------------------------------------
18rem Set CLASSPATH and Java options
19rem
20rem $Id: setclasspath.bat 562770 2007-08-04 22:13:58Z markt $
21rem ---------------------------------------------------------------------------
22
23rem Make sure prerequisite environment variables are set
24if not "%JAVA_HOME%" == "" goto gotJdkHome
25if not "%JRE_HOME%" == "" goto gotJreHome
26echo Neither the JAVA_HOME nor the JRE_HOME environment variable is defined
27echo At least one of these environment variable is needed to run this program
28goto exit
29
30:gotJreHome
31if not exist "%JRE_HOME%\bin\java.exe" goto noJavaHome
32if not exist "%JRE_HOME%\bin\javaw.exe" goto noJavaHome
33if not ""%1"" == ""debug"" goto okJavaHome
34echo JAVA_HOME should point to a JDK in order to run in debug mode.
35goto exit
36
37:gotJdkHome
38if not exist "%JAVA_HOME%\bin\java.exe" goto noJavaHome
39if not exist "%JAVA_HOME%\bin\javaw.exe" goto noJavaHome
40if not exist "%JAVA_HOME%\bin\jdb.exe" goto noJavaHome
41if not exist "%JAVA_HOME%\bin\javac.exe" goto noJavaHome
42if not "%JRE_HOME%" == "" goto okJavaHome
43set JRE_HOME=%JAVA_HOME%
44goto okJavaHome
45
46:noJavaHome
47echo The JAVA_HOME environment variable is not defined correctly
48echo This environment variable is needed to run this program
49echo NB: JAVA_HOME should point to a JDK not a JRE
50goto exit
51:okJavaHome
52
53if not "%BASEDIR%" == "" goto gotBasedir
54echo The BASEDIR environment variable is not defined
55echo This environment variable is needed to run this program
56goto exit
57:gotBasedir
58if exist "%BASEDIR%\bin\setclasspath.bat" goto okBasedir
59echo The BASEDIR environment variable is not defined correctly
60echo This environment variable is needed to run this program
61goto exit
62:okBasedir
63
64rem Set the default -Djava.endorsed.dirs argument
65set JAVA_ENDORSED_DIRS=%BASEDIR%\endorsed
66
67rem Set standard CLASSPATH
68rem Note that there are no quotes as we do not want to introduce random
69rem quotes into the CLASSPATH
70if not exist "%JAVA_HOME%\lib\tools.jar" goto noJavac
71set CLASSPATH=%JAVA_HOME%\lib\tools.jar
72:noJavac
73
74rem Set standard command for invoking Java.
75rem Note that NT requires a window name argument when using start.
76rem Also note the quoting as JAVA_HOME may contain spaces.
77set _RUNJAVA="%JRE_HOME%\bin\java"
78set _RUNJAVAW="%JRE_HOME%\bin\javaw"
79set _RUNJDB="%JAVA_HOME%\bin\jdb"
80set _RUNJAVAC="%JAVA_HOME%\bin\javac"
81
82goto end
83
84:exit
85exit /b 1
86
87:end
Note: See TracBrowser for help on using the repository browser.