chiark / gitweb /
Use OpenJDK if java symlink seems broken
authorceb <clareb@felix.relativity.greenend.org.uk>
Sat, 19 Jun 2010 15:25:25 +0000 (16:25 +0100)
committerceb <clareb@felix.relativity.greenend.org.uk>
Sat, 19 Jun 2010 15:25:25 +0000 (16:25 +0100)
jpctb

diff --git a/jpctb b/jpctb
index 28f71c1..e04b956 100755 (executable)
--- a/jpctb
+++ b/jpctb
@@ -73,12 +73,17 @@ fi
 
 yppdir="${yohoho%/*}"
 
+openjdk=/usr/lib/jvm/java-6-openjdk
+
 if [ -x "$yppdir/java/bin/java" ]; then
        javadir="$yppdir/java"
 elif [ x"$JAVA_HOME" != x ] && [ -x "$JAVA_HOME/bin/java" ]; then
        javadir="$JAVA_HOME"
+elif [ -x $openjdk/bin/java ]; then
+       javadir=$openjdk
 else
-       fail "could not find java runtime system"
+       fail "could not find java runtime system
+ please check that $yppdir/java points to your Java installation"
 fi
 
 case "$javadir" in