$OpenBSD: patch-bin_setclasspath_sh,v 1.1.1.1 2004/11/04 21:46:04 naddy Exp $
--- bin/setclasspath.sh.orig	Sat Aug 28 20:02:20 2004
+++ bin/setclasspath.sh	Thu Oct 14 09:58:53 2004
@@ -4,10 +4,16 @@
 #  $Id: patch-bin_setclasspath_sh,v 1.1.1.1 2004/11/04 21:46:04 naddy Exp $
 # -----------------------------------------------------------------------------
 
+# Read $JAVA_HOME - sudo doesn't pass environment variables
+if [ -r "%%SYSCONFDIR%%/tomcat/tomcat.rc" ]; then     
+  . %%SYSCONFDIR%%/tomcat/tomcat.rc
+fi
+
 # Make sure prerequisite environment variables are set
 if [ -z "$JAVA_HOME" ]; then
   echo "The JAVA_HOME environment variable is not defined"
   echo "This environment variable is needed to run this program"
+  echo "Edit \`%%SYSCONFDIR%%/tomcat/tomcat.rc' to point to your \$JAVA_HOME"
   exit 1
 fi
 if $os400; then
