geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dwo...@apache.org
Subject svn commit: r699019 - /geronimo/server/trunk/assemblies/geronimo-boilerplate/src/main/underlay/bin/setjavaenv.sh
Date Thu, 25 Sep 2008 16:54:01 GMT
Author: dwoods
Date: Thu Sep 25 09:54:01 2008
New Revision: 699019

URL: http://svn.apache.org/viewvc?rev=699019&view=rev
Log:
GERONIMO-4312 slight change to Jencks' fix to verify that java exists and give an error if
not

Modified:
    geronimo/server/trunk/assemblies/geronimo-boilerplate/src/main/underlay/bin/setjavaenv.sh

Modified: geronimo/server/trunk/assemblies/geronimo-boilerplate/src/main/underlay/bin/setjavaenv.sh
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/assemblies/geronimo-boilerplate/src/main/underlay/bin/setjavaenv.sh?rev=699019&r1=699018&r2=699019&view=diff
==============================================================================
--- geronimo/server/trunk/assemblies/geronimo-boilerplate/src/main/underlay/bin/setjavaenv.sh
(original)
+++ geronimo/server/trunk/assemblies/geronimo-boilerplate/src/main/underlay/bin/setjavaenv.sh
Thu Sep 25 09:54:01 2008
@@ -37,11 +37,19 @@
 
 # Make sure prerequisite environment variables are set
 if [ -z "$JAVA_HOME" -a -z "$JRE_HOME" ]; then
-  _RUNJAVA="java"
+  __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
-#  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
 
 if [ -z "$JAVA_HOME" -a "$1" = "debug" ]; then
   echo "JAVA_HOME should point to a JDK in order to run in debug mode."
@@ -97,4 +105,4 @@
 if [ "$os400" != "true" ]; then
   _RUNJDB="$JAVA_HOME"/bin/jdb
 fi
-fi
\ No newline at end of file
+fi



Mime
View raw message