clarified ISABELLE_JDK_HOME vs. JAVA_HOME;
authorwenzelm
Mon Oct 27 16:11:24 2014 +0100 (2014-10-27)
changeset 5879100916b0dd596
parent 58790 a42a5129df91
child 58792 d6d9bb806bb5
clarified ISABELLE_JDK_HOME vs. JAVA_HOME;
Admin/build
lib/Tools/java
lib/scripts/getsettings
src/Pure/build-jars
     1.1 --- a/Admin/build	Mon Oct 27 16:00:04 2014 +0100
     1.2 +++ b/Admin/build	Mon Oct 27 16:11:24 2014 +0100
     1.3 @@ -24,8 +24,8 @@
     1.4    The MODULES list may contain any of the following:
     1.5  
     1.6      all             all modules below
     1.7 -    browser         graph browser (requires jdk)
     1.8 -    jars            Isabelle/Scala (requires \$ISABELLE_JDK_HOME and \$SCALA_HOME)
     1.9 +    browser         graph browser
    1.10 +    jars            Isabelle/Scala
    1.11      jars_test       test separate build of jars
    1.12      jars_fresh      fresh build of jars
    1.13  
     2.1 --- a/lib/Tools/java	Mon Oct 27 16:00:04 2014 +0100
     2.2 +++ b/lib/Tools/java	Mon Oct 27 16:11:24 2014 +0100
     2.3 @@ -9,6 +9,6 @@
     2.4  [ -n "$CLASSPATH" ] && classpath "$CLASSPATH"
     2.5  unset CLASSPATH
     2.6  
     2.7 -isabelle_jdk java "${JAVA_ARGS[@]}" \
     2.8 +isabelle_java java "${JAVA_ARGS[@]}" \
     2.9    -classpath "$(jvmpath "$ISABELLE_CLASSPATH")" "$@"
    2.10  
     3.1 --- a/lib/scripts/getsettings	Mon Oct 27 16:00:04 2014 +0100
     3.2 +++ b/lib/scripts/getsettings	Mon Oct 27 16:11:24 2014 +0100
     3.3 @@ -119,7 +119,7 @@
     3.4  function isabelle_jdk ()
     3.5  {
     3.6    if [ -z "$ISABELLE_JDK_HOME" ]; then
     3.7 -    echo "Unknown ISABELLE_JDK_HOME -- Java tools unavailable" >&2
     3.8 +    echo "Unknown ISABELLE_JDK_HOME -- Java development tools unavailable" >&2
     3.9      return 127
    3.10    else
    3.11      local PRG="$1"; shift
    3.12 @@ -127,11 +127,23 @@
    3.13    fi
    3.14  }
    3.15  
    3.16 +#robust invocation via JAVA_HOME
    3.17 +function isabelle_java ()
    3.18 +{
    3.19 +  if [ -z "$JAVA_HOME" ]; then
    3.20 +    echo "Unknown JAVA_HOME -- Java unavailable" >&2
    3.21 +    return 127
    3.22 +  else
    3.23 +    local PRG="$1"; shift
    3.24 +    "$JAVA_HOME/bin/$PRG" "$@"
    3.25 +  fi
    3.26 +}
    3.27 +
    3.28  #robust invocation via SCALA_HOME
    3.29  function isabelle_scala ()
    3.30  {
    3.31 -  if [ -z "$ISABELLE_JDK_HOME" ]; then
    3.32 -    echo "Unknown ISABELLE_JDK_HOME -- Java tools unavailable" >&2
    3.33 +  if [ -z "$JAVA_HOME" ]; then
    3.34 +    echo "Unknown JAVA_HOME -- Java unavailable" >&2
    3.35      return 127
    3.36    elif [ -z "$SCALA_HOME" ]; then
    3.37      echo "Unknown SCALA_HOME -- Scala unavailable" >&2
    3.38 @@ -261,7 +273,7 @@
    3.39  ISABELLE_OUTPUT="$ISABELLE_OUTPUT/$ML_IDENTIFIER"
    3.40  
    3.41  #enforce JAVA_HOME
    3.42 -export JAVA_HOME="$ISABELLE_JDK_HOME"
    3.43 +export JAVA_HOME="$ISABELLE_JDK_HOME/jre"
    3.44  
    3.45  #build condition etc.
    3.46  case "$ML_SYSTEM" in
     4.1 --- a/src/Pure/build-jars	Mon Oct 27 16:00:04 2014 +0100
     4.2 +++ b/src/Pure/build-jars	Mon Oct 27 16:11:24 2014 +0100
     4.3 @@ -223,7 +223,7 @@
     4.4    SCALAC_OPTIONS="$ISABELLE_SCALA_BUILD_OPTIONS -d classes"
     4.5  
     4.6    (
     4.7 -    classpath "$ISABELLE_JDK_HOME/jre/lib/jfxrt.jar"
     4.8 +    classpath "$JAVA_HOME/lib/jfxrt.jar"
     4.9      classpath classes
    4.10      export CLASSPATH="$(jvmpath "$ISABELLE_CLASSPATH")"
    4.11