more robust invocation via ISABELLE_JDK_HOME and SCALA_HOME;
authorwenzelm
Sat Apr 14 14:36:36 2012 +0200 (2012-04-14)
changeset 4746571d5f37ee2bf
parent 47464 b1cd02f2d534
child 47466 28e15b9a70c1
more robust invocation via ISABELLE_JDK_HOME and SCALA_HOME;
lib/Tools/java
lib/scripts/getsettings
src/Tools/JVM/java_ext_dirs
     1.1 --- a/lib/Tools/java	Sat Apr 14 13:05:59 2012 +0200
     1.2 +++ b/lib/Tools/java	Sat Apr 14 14:36:36 2012 +0200
     1.3 @@ -12,6 +12,6 @@
     1.4    SERVER=""
     1.5  fi
     1.6  
     1.7 -exec "$ISABELLE_JDK_HOME/bin/java" -Dfile.encoding=UTF-8 $SERVER \
     1.8 +isabelle_jdk java -Dfile.encoding=UTF-8 $SERVER \
     1.9    "-Djava.ext.dirs=$("$ISABELLE_HOME/src/Tools/JVM/java_ext_dirs")" "$@"
    1.10  
     2.1 --- a/lib/scripts/getsettings	Sat Apr 14 13:05:59 2012 +0200
     2.2 +++ b/lib/scripts/getsettings	Sat Apr 14 14:36:36 2012 +0200
     2.3 @@ -95,18 +95,27 @@
     2.4  
     2.5  #robust invocation via ISABELLE_JDK_HOME
     2.6  function isabelle_jdk () {
     2.7 -  [ -z "$ISABELLE_JDK_HOME" ] && \
     2.8 -    { echo "Unknown ISABELLE_JDK_HOME -- Java tools unavailable" >&2; return 2; }
     2.9 -  local PRG="$1"; shift
    2.10 -  "$ISABELLE_JDK_HOME/bin/$PRG" "$@"
    2.11 +  if [ -z "$ISABELLE_JDK_HOME" ]; then
    2.12 +    echo "Unknown ISABELLE_JDK_HOME -- Java tools unavailable" >&2
    2.13 +    return 2
    2.14 +  else
    2.15 +    local PRG="$1"; shift
    2.16 +    "$ISABELLE_JDK_HOME/bin/$PRG" "$@"
    2.17 +  fi
    2.18  }
    2.19  
    2.20  #robust invocation via SCALA_HOME
    2.21  function isabelle_scala () {
    2.22 -  [ -z "$SCALA_HOME" ] && \
    2.23 -    { echo "Unknown SCALA_HOME -- Scala unavailable" >&2; return 2; }
    2.24 -  local PRG="$1"; shift
    2.25 -  "$SCALA_HOME/bin/$PRG" "$@"
    2.26 +  if [ -z "$ISABELLE_JDK_HOME" ]; then
    2.27 +    echo "Unknown ISABELLE_JDK_HOME -- Java tools unavailable" >&2
    2.28 +    return 2
    2.29 +  elif [ -z "$SCALA_HOME" ]; then
    2.30 +    echo "Unknown SCALA_HOME -- Scala unavailable" >&2
    2.31 +    return 2
    2.32 +  else
    2.33 +    local PRG="$1"; shift
    2.34 +    "$SCALA_HOME/bin/$PRG" "$@"
    2.35 +  fi
    2.36  }
    2.37  
    2.38  #CLASSPATH convenience
     3.1 --- a/src/Tools/JVM/java_ext_dirs	Sat Apr 14 13:05:59 2012 +0200
     3.2 +++ b/src/Tools/JVM/java_ext_dirs	Sat Apr 14 14:36:36 2012 +0200
     3.3 @@ -19,5 +19,5 @@
     3.4  
     3.5  isabelle_jdk java \
     3.6    -classpath "$(jvmpath "$ISABELLE_HOME/src/Tools/JVM/java_ext_dirs.jar")" \
     3.7 -  isabelle.Java_Ext_Dirs "$(jvmpath "$ISABELLE_HOME/lib/classes/ext")"
     3.8 +  isabelle.Java_Ext_Dirs "$(jvmpath "$ISABELLE_HOME/lib/classes/ext")" 2>/dev/null
     3.9