What about adding this part in tomcat.sh (TC 3.3) and
catalina.sh/jasper.sh to help them discover JAVA_HOME on 
at least Linux systems ?

+if [ -z "$JAVA_HOME" ]; then
+    # Search for java in PATH
+    JAVA=`which java`
+    if [ -z "$JAVA" ] ; then
+    JAVA_BINDIR=`dirname ${JAVA}`
+    JAVA_HOME="${JAVA_BINDIR}/.."
+    fi
+    # Default clean JAVA_HOME
+    [ -z "$JAVA_HOME"  -a -d "/usr/lib/java" ] &&  JAVA_HOME="/usr/lib/java"
+    # Default IBM JAVA_HOME
+    [ -z "$JAVA_HOME"  -a -d "/opt/IBMJava2-13" ] &&  JAVA_HOME="/opt/IBMJava2-13"
+    # Another solution
+    [ -z "$JAVA_HOME"  -a -d "/usr/java/jdk" ] &&  JAVA_HOME="/usr/java/jdk"
+    # madeinlinux JAVA_HOME
+    [ -z "$JAVA_HOME" -a -d "/usr/local/jdk1.2.2" ] && JAVA_HOME="/usr/local/jdk1.2.2"
+    # Kondara JAVA_HOME
+    [ -z "$JAVA_HOME"  -a -d "/usr/lib/java/jdk1.2.2" ] && 
+JAVA_HOME="/usr/lib/java/jdk1.2.2"
+    # Other commonly found JAVA_HOMEs
+    [ -z "$JAVA_HOME"  -a -d "/usr/jdk1.2" ] && JAVA_HOME="/usr/jdk1.2"
+    # Default Caldera JAVA_HOME
+    [ -z "$JAVA_HOME"  -a -d "/opt/java-1.3" ] && JAVA_HOME="/opt/java-1.3"
+    # Add other locations here
+    if [ -z "$JAVA_HOME" ]; then
+        echo "No JAVA_HOME specified in ${TOMCAT_CFG} and no java found, exiting..."
+        exit 1
+  fi

the ${TOMCAT_CFG} is a config file (shell) which allow you to setup 
TC 3.3/4.0.2 runtime, and could be also added to CVS :

=> TC 3.3 conf :

# tomcat /etc/rc.d script example configuration file
# Use with version 1.07 of the scripts or later

# Where your java installation lives
# JAVA_HOME=/usr/java/jdk
JAVA_HOME="/opt/IBMJava2-13"

# You can pass some parameters to java
# here if you wish to
#JAVACMD="$JAVA_HOME/bin/java -Xminf0.1 -Xmaxf0.3"

# Where your tomcat installation lives
# That change from previous RPM where TOMCAT_HOME 
# used to be /var/tomcat.
# Now /var/tomcat will be the base for webapps only
TOMCAT_HOME="@@@TCHOME@@@"

# Where our webapps/libs are now installed.
TOMCAT_INSTALL="@@@TCINST@@@"

# What user should run tomcat
TOMCAT_USER="tomcat3"

# You can change your tomcat locale here
#LANG=en_US

# If you wish to further customize your tomcat environment,
# put your own definitions here
# (i.e. LD_LIBRARY_PATH for some jdbc drivers)
# Just do not forget to export them :)


=> TC 4.0.2 conf :

# tomcat /etc/rc.d script example configuration file
# Use with version 1.07 of the scripts or later

# Where your java installation lives
# JAVA_HOME=/usr/java/jdk
JAVA_HOME="/opt/IBMJava2-13"

# You can pass some parameters to java
# here if you wish to
#JAVACMD="$JAVA_HOME/bin/java -Xminf0.1 -Xmaxf0.3"

# Where your tomcat installation lives
# That change from previous RPM where TOMCAT_HOME 
# used to be /var/tomcat.
# Now /var/tomcat will be the base for webapps only
CATALINA_HOME="@@@TCHOME@@@"
JASPER_HOME="@@@TCHOME@@@"
CATALINA_TMPDIR="@@@TCHOME@@@/temp"

# What user should run tomcat
TOMCAT_USER="tomcat4"

# You can change your tomcat locale here
#LANG=en_US

# If you wish to further customize your tomcat environment,
# put your own definitions here
# (i.e. LD_LIBRARY_PATH for some jdbc drivers)
# Just do not forget to export them :)


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to