All pastes #252070 Raw Edit

Stuff

public text v1 · immutable
#252070 ·published 2006-11-19 01:10 UTC
rendered paste body
Index: tools/run/runjava
===================================================================
--- tools/run/runjava   (revision 5172)
+++ tools/run/runjava   (working copy)
@@ -117,6 +117,7 @@
        fi
        return 0
     else
+       tell "$JP is not Java 1.4 or newer"
        return 1
     fi
 }
@@ -133,10 +134,13 @@
 #
 javaPaths() {
     for searchdir in $searchdirs; do
+        if [ ! -d "$searchdir" ]; then
+            continue;
+        fi
        # We search "j2*" for the Sun-supplied Java packages ("j2sdk"),
        # "java" for the Java installation shipped with SuSE, and "Home"
        # to catch /Library/Java/Home on Mac OS X.
-       jdirs="`find \"$searchdir\" -name \"j2*\" -o -name \"java\" -o -name \"Home\" -maxdepth 2 -print`"
+       jdirs="`find \"$searchdir\" \\( -name \"j2*\" -o -name \"jdk*\" -o -name \"java\" -o -name \"Home\" \\) -maxdepth 2 -print`"
        for jdir in $jdirs; do
            if [ -x $jdir/bin/java ]; then
                JP=$jdir/bin/java