On the XP has already installed the JDK1.5 and set up the Java_home, but the Tomcat is not found in the boot process.
The error message is as follows: Neither the Java_home nor the JRE_HOME environment variable is defined at least one of these environment variable I s needed to run this program; java_home jre_home path is not found, what solution?
The reason is not known, the following to see the solution:
1, Analysis Startup.bat startup script: found that it called Catalina.bat, and Catalina.bat called Setclasspath.bat
2, the Java_home and jre_home values are defined in the head of the Setclasspath.bat, then manually set the Java_home variable here
Copy Code code as follows:
Rem
REM Set CLASSPATH and Java options
Rem
REM $Id: Setclasspath.bat 505241 2007-02-09 10:22:58z jfclere $
Rem
Set Java_home=c:\program files\java\jdk1.5.0_05
Set Jre_home=c:\program files\java\jre1.5.0_05
REM Make sure prerequisite environment variables are set
If not "%java_home%" = "" Goto gotjdkhome
If not "%jre_home%" = "" Goto gotjrehome
Echo neither the Java_home nor the JRE_HOME environment variable is defined
Echo at least one of the environment variable is needed to run this program
Goto exit
: Gotjrehome
If not exist "%jre_home%\bin\java.exe" goto nojavahome
If not exist "%jre_home%\bin\javaw.exe" goto nojavahome
If not "%1" "= =" "Debug" goto Okjavahome
Echo Java_home should point to a JDK in order to run in debug mode.
Goto exit
: Gotjdkhome
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
If not "%jre_home%" = "" Goto okjavahome
Set jre_home=%java_home%
Goto Okjavahome
: Nojavahome
echo the JAVA_HOME environment variable is not defined correctly
echo this environment variable be needed to run this program
Echo Nb:java_home should to a JDK not a JRE
Goto exit
: Okjavahome
If not? " sedir% "= =" "Goto Gotbasedir
echo the BASEDIR environment variable is not defined
echo this environment variable be needed to run this program
Goto exit
: Gotbasedir
If exist "? Sedir%\bin\setclasspath.bat "Goto Okbasedir
echo the BASEDIR environment variable is not defined correctly
echo this environment variable be needed to run this program
Goto exit
: Okbasedir
REM Set the Default-djava.endorsed.dirs argument
Set java_endorsed_dirs=? Sedir%\endorsed
REM Set Standard CLASSPATH
REM Note this there are no quotes as we do not want to introduce random
REM quotes into the CLASSPATH
If not exist "%java_home%\bin\tools.jar" goto Nojavac
Set Classpath=%java_home%\lib\tools.jar
: Nojavac
REM Set standard command for invoking Java.
REM Note This is NT requires a window Name argument when using start.
REM Also note the quoting as java_home may contain spaces.
Set _runjava= "%jre_home%\bin\java"
Set _runjavaw= "%JRE_HOME%\BIN\JAVAW"
Set _runjdb= "%java_home%\bin\jdb"
Set _runjavac= "%java_home%\bin\javac"
Goto END
: Exit
Exit/b 1
: End
3, restart Tomcat, typing http://localhost:8080 verification, problem solving.
TOMCAT5 need jdk1.6 do support, jdk1.5 not enough.