Author: nd-guest
Date: 2008-03-11 22:03:02 +0000 (Tue, 11 Mar 2008)
New Revision: 1398

Modified:
   packages/josm/trunk/debian/josm.sh
Log:
Use /usr/bin/java by default.


Modified: packages/josm/trunk/debian/josm.sh
===================================================================
--- packages/josm/trunk/debian/josm.sh  2008-03-11 22:01:54 UTC (rev 1397)
+++ packages/josm/trunk/debian/josm.sh  2008-03-11 22:03:02 UTC (rev 1398)
@@ -1,27 +1,16 @@
 #!/bin/sh
 # Simple wrapper script used to start JOSM in Debian
-# The first existing directory is used for JAVA_HOME if it's not set by 
default.
+
 set -e
 
-JDK_DIRS="$JAVA_HOME /usr/lib/jvm/java-6-sun /usr/lib/jvm/java-1.5.0-sun"
-
-for jdir in $JDK_DIRS; do 
-    if [ -x "$jdir/bin/java" -a -z "${JAVA_HOME}" ]; then
-        JAVA_HOME="$jdir"
-    fi
-done
-export JAVA_HOME
-
-if [ "$JAVA_HOME" ]; then
-    if [ -z "$JAVACMD" ]; then
+if [ -z "$JAVACMD" ]; then
+    if [ -n "$JAVA_HOME" ]; then
         JAVACMD="$JAVA_HOME/bin/java"
-    fi
+    else    
+        JAVACMD="/usr/bin/java"
+    fi    
+fi
 
-    exec $JAVACMD -jar /usr/share/josm/josm.jar
+exec $JAVACMD -jar /usr/share/josm/josm.jar "$@"
 
-else    
-    echo "No JVM found to run JOSM."
-    echo "Please install a JVM from SUN to run JOSM or "
-    echo "set JAVA_HOME if it's not a JVM from a Debian Package."
-    exit 1
-fi
+


_______________________________________________
Pkg-grass-devel mailing list
Pkg-grass-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/pkg-grass-devel

Reply via email to