You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2005/02/15 23:17:53 UTC

cvs commit: jakarta-tomcat-4.0/catalina/src/bin setclasspath.bat setclasspath.sh

markt       2005/02/15 14:17:53

  Modified:    catalina/src/bin setclasspath.bat setclasspath.sh
  Log:
  Fix bug 26558. Improve error message when there is a problem with JAVA_HOME.
   - Based on a patch supplied by Kent Schnaith,
  
  Revision  Changes    Path
  1.10      +19 -7     jakarta-tomcat-4.0/catalina/src/bin/setclasspath.bat
  
  Index: setclasspath.bat
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/bin/setclasspath.bat,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- setclasspath.bat	12 Feb 2004 21:38:12 -0000	1.9
  +++ setclasspath.bat	15 Feb 2005 22:17:53 -0000	1.10
  @@ -10,13 +10,25 @@
   echo This environment variable is needed to run this program
   goto end
   :gotJavaHome
  -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 exist "%JAVA_HOME%\bin\java.exe" goto noJava
  +if not exist "%JAVA_HOME%\bin\javaw.exe" goto noJavaw
  +if not exist "%JAVA_HOME%\bin\jdb.exe" goto noJdb
  +if not exist "%JAVA_HOME%\bin\javac.exe" goto noJavac
   goto okJavaHome
  -:noJavaHome
  -echo The JAVA_HOME environment variable is not defined correctly
  +:noJava
  +echo JAVA_HOME\bin\java.exe is missing
  +goto badJavaHome
  +:noJavaw
  +echo JAVA_HOME\bin\javaw.exe is missing
  +goto badJavaHome
  +:noJdb
  +echo JAVA_HOME\bin\jdb.exe is missing
  +goto badJavaHome
  +:noJavac
  +echo JAVA_HOME\bin\javac.exe is missing
  +goto badJavaHome
  +:badJavaHome
  +echo The JAVA_HOME environment variable may not be 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 end
  
  
  
  1.14      +21 -13    jakarta-tomcat-4.0/catalina/src/bin/setclasspath.sh
  
  Index: setclasspath.sh
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/bin/setclasspath.sh,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- setclasspath.sh	26 Jul 2004 21:29:42 -0000	1.13
  +++ setclasspath.sh	15 Feb 2005 22:17:53 -0000	1.14
  @@ -10,21 +10,29 @@
     echo "This environment variable is needed to run this program"
     exit 1
   fi
  -if $os400; then
  -  if [ ! -x "$JAVA_HOME"/bin/java -o ! -x "$JAVA_HOME"/bin/javac ]; then
  -    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"
  -    exit 1
  -  fi
  -else
  -  if [ ! -x "$JAVA_HOME"/bin/java -o ! -x "$JAVA_HOME"/bin/jdb -o ! -x "$JAVA_HOME"/bin/javac ]; then
  -    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"
  +if [ ! -x "$JAVA_HOME"/bin/java ]; then
  +  echo "Error: The JAVA_HOME/bin/java directory is missing or not executable."
  +  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."
  +  exit 1
  +fi
  +if [ ! "$os400" ]; then
  +  if [ ! -x "$JAVA_HOME"/bin/jdb ]; then
  +    echo "Error: The JAVA_HOME/bin/jdb directory is missing or not executable."
  +    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."
       exit 1
     fi
   fi
  +if [ ! -x "$JAVA_HOME"/bin/javac ]; then
  +  echo "Error: The JAVA_HOME/bin/javac directory is missing or not executable."
  +  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."
  +  exit 1
  +fi
   if [ -z "$BASEDIR" ]; then
     echo "The BASEDIR environment variable is not defined"
     echo "This environment variable is needed to run this program"
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org