[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#146292: Detection patch



tags 146292 + patch
thanks,

This patch implements a bit more generic Java detection:

diff -Naur debian-old/scripts/detect_java.sh debian-new/scripts/detect_java.sh
--- debian-old/scripts/detect_java.sh	2003-05-08 05:08:26.000000000 +0000
+++ debian-new/scripts/detect_java.sh	2003-05-08 05:08:48.000000000 +0000
@@ -1,7 +1,11 @@
 #!/bin/sh

 # where is Java? ;)
-if [ -x /usr/lib/j2sdk1.3/bin/javac ]; then
+GUESS1="`stat -c '%N' /etc/alternatives/javac | sed 's/^.*-> 
\`//;s/\/bin\/javac.\?//'`" &>/dev/null
+
+if [ -x "$GUESS1" ]; then
+        JDK_HOME="$GUESS1"
+elif [ -x /usr/lib/j2sdk1.3/bin/javac ]; then
 	JDK_HOME=/usr/lib/j2sdk1.3
 elif [ -x /usr/lib/j2se/1.3/bin/javac ]; then
 	JDK_HOME=/usr/lib/j2se/1.3




Reply to: