geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dwo...@apache.org
Subject svn commit: r699020 - /geronimo/server/branches/2.1/assemblies/geronimo-boilerplate-minimal/src/main/underlay/bin/setjavaenv.sh
Date Thu, 25 Sep 2008 16:55:18 GMT
Author: dwoods
Date: Thu Sep 25 09:55:18 2008
New Revision: 699020

URL: http://svn.apache.org/viewvc?rev=699020&view=rev
Log:
GERONIMO-4312 merge in fix from trunk r699019

Modified:
    geronimo/server/branches/2.1/assemblies/geronimo-boilerplate-minimal/src/main/underlay/bin/setjavaenv.sh

Modified: geronimo/server/branches/2.1/assemblies/geronimo-boilerplate-minimal/src/main/underlay/bin/setjavaenv.sh
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.1/assemblies/geronimo-boilerplate-minimal/src/main/underlay/bin/setjavaenv.sh?rev=699020&r1=699019&r2=699020&view=diff
==============================================================================
--- geronimo/server/branches/2.1/assemblies/geronimo-boilerplate-minimal/src/main/underlay/bin/setjavaenv.sh
(original)
+++ geronimo/server/branches/2.1/assemblies/geronimo-boilerplate-minimal/src/main/underlay/bin/setjavaenv.sh
Thu Sep 25 09:55:18 2008
@@ -37,10 +37,20 @@
 
 # Make sure prerequisite environment variables are set
 if [ -z "$JAVA_HOME" -a -z "$JRE_HOME" ]; then
-  echo "Neither the JAVA_HOME nor the JRE_HOME environment variable is defined"
-  echo "At least one of these environment variable is needed to run this program"
-  exit 1
-fi
+  __JAVA_TEST="which java"
+  if [ -n "__JAVA_TEST" ]; then
+    _RUNJAVA="java"
+  else
+    echo ""
+    echo "ERROR:  Could not find a Java runtime."
+    echo " - Neither the JAVA_HOME nor the JRE_HOME environment variable is defined"
+    echo " - A Java implementation could not be found on the system PATH"
+    echo "At least one of these is required for this program to execute."
+    echo ""
+    exit 1
+  fi
+else
+
 if [ -z "$JAVA_HOME" -a "$1" = "debug" ]; then
   echo "JAVA_HOME should point to a JDK in order to run in debug mode."
   exit 1
@@ -95,3 +105,4 @@
 if [ "$os400" != "true" ]; then
   _RUNJDB="$JAVA_HOME"/bin/jdb
 fi
+fi



Mime
View raw message