more precise handling of java failure, due to missing ISABELLE_JDK_HOME;
authorwenzelm
Mon Apr 16 15:09:47 2012 +0200 (2012-04-16 ago)
changeset 47490f4348634595b
parent 47489 04e7d09ade7a
child 47491 62d93aec1846
child 47492 2631a12fb2d1
more precise handling of java failure, due to missing ISABELLE_JDK_HOME;
lib/scripts/getsettings
src/HOL/Tools/Nitpick/kodkod.ML
src/HOL/Tools/Nitpick/nitpick.ML
     1.1 --- a/lib/scripts/getsettings	Mon Apr 16 11:24:57 2012 +0200
     1.2 +++ b/lib/scripts/getsettings	Mon Apr 16 15:09:47 2012 +0200
     1.3 @@ -97,7 +97,7 @@
     1.4  function isabelle_jdk () {
     1.5    if [ -z "$ISABELLE_JDK_HOME" ]; then
     1.6      echo "Unknown ISABELLE_JDK_HOME -- Java tools unavailable" >&2
     1.7 -    return 2
     1.8 +    return 127
     1.9    else
    1.10      local PRG="$1"; shift
    1.11      "$ISABELLE_JDK_HOME/bin/$PRG" "$@"
    1.12 @@ -108,10 +108,10 @@
    1.13  function isabelle_scala () {
    1.14    if [ -z "$ISABELLE_JDK_HOME" ]; then
    1.15      echo "Unknown ISABELLE_JDK_HOME -- Java tools unavailable" >&2
    1.16 -    return 2
    1.17 +    return 127
    1.18    elif [ -z "$SCALA_HOME" ]; then
    1.19      echo "Unknown SCALA_HOME -- Scala unavailable" >&2
    1.20 -    return 2
    1.21 +    return 127
    1.22    else
    1.23      local PRG="$1"; shift
    1.24      "$SCALA_HOME/bin/$PRG" "$@"
     2.1 --- a/src/HOL/Tools/Nitpick/kodkod.ML	Mon Apr 16 11:24:57 2012 +0200
     2.2 +++ b/src/HOL/Tools/Nitpick/kodkod.ML	Mon Apr 16 15:09:47 2012 +0200
     2.3 @@ -1067,7 +1067,7 @@
     2.4                    TimedOut js
     2.5                  else if code = 0 then
     2.6                    Normal ([], js, first_error)
     2.7 -                else if has_error "exec: java" then
     2.8 +                else if code = 127 then
     2.9                    JavaNotInstalled
    2.10                  else if has_error "UnsupportedClassVersionError" then
    2.11                    JavaTooOld
     3.1 --- a/src/HOL/Tools/Nitpick/nitpick.ML	Mon Apr 16 11:24:57 2012 +0200
     3.2 +++ b/src/HOL/Tools/Nitpick/nitpick.ML	Mon Apr 16 15:09:47 2012 +0200
     3.3 @@ -178,7 +178,7 @@
     3.4                 (length ts downto 1) ts))]
     3.5  
     3.6  fun install_java_message () =
     3.7 -  "Nitpick requires a Java 1.5 virtual machine called \"java\"."
     3.8 +  "Nitpick requires Java Development Kit 1.6/1.7 via ISABELLE_JDK_HOME setting."
     3.9  fun install_kodkodi_message () =
    3.10    "Nitpick requires the external Java program Kodkodi. To install it, download \
    3.11    \the package from \"http://www21.in.tum.de/~blanchet/#software\" and add the \