maintain classpath in more elementary manner: turn ISABELLE_CLASSPATH into -classpath option, so that all jars are covered by sun.misc.Launcher.AppClassLoader (e.g. relevant for loading add-on resources);
authorwenzelm
Thu Sep 12 13:23:54 2013 +0200 (2013-09-12)
changeset 53576793a429c63e7
parent 53575 df79aa33bb74
child 53577 d033bc00b762
maintain classpath in more elementary manner: turn ISABELLE_CLASSPATH into -classpath option, so that all jars are covered by sun.misc.Launcher.AppClassLoader (e.g. relevant for loading add-on resources);
ignore $ISABELLE_JAVA_EXT -- do not change java.ext.dirs;
Admin/components/components.sha1
Admin/components/main
etc/settings
lib/Tools/java
lib/Tools/scala
lib/Tools/scalac
lib/scripts/getsettings
src/Doc/System/Scala.thy
src/Pure/build-jars
src/Tools/Graphview/lib/Tools/graphview
src/Tools/jEdit/lib/Tools/jedit
     1.1 --- a/Admin/components/components.sha1	Wed Sep 11 23:32:47 2013 +0200
     1.2 +++ b/Admin/components/components.sha1	Thu Sep 12 13:23:54 2013 +0200
     1.3 @@ -34,6 +34,7 @@
     1.4  c85c0829b8170f25aa65ec6852f505ce2a50639b  jedit_build-20130628.tar.gz
     1.5  5de3e399be2507f684b49dfd13da45228214bbe4  jedit_build-20130905.tar.gz
     1.6  87136818fd5528d97288f5b06bd30c787229eb0d  jedit_build-20130910.tar.gz
     1.7 +0bd2bc2d9a491ba5fc8dd99df27c04f11a72e8fa  jfreechart-1.0.14-1.tar.gz
     1.8  8122526f1fc362ddae1a328bdbc2152853186fee  jfreechart-1.0.14.tar.gz
     1.9  6c737137cc597fc920943783382e928ea79e3feb  kodkodi-1.2.16.tar.gz
    1.10  5f95c96bb99927f3a026050f85bd056f37a9189e  kodkodi-1.5.2.tar.gz
    1.11 @@ -59,6 +60,7 @@
    1.12  e6a43b7b3b21295853bd2a63b27ea20bd6102f5f  windows_app-20130906.tar.gz
    1.13  8fe004aead867d4c82425afac481142bd3f01fb0  windows_app-20130908.tar.gz
    1.14  d273abdc7387462f77a127fa43095eed78332b5c  windows_app-20130909.tar.gz
    1.15 +1c36a840320dfa9bac8af25fc289a4df5ea3eccb  xz-java-1.2-1.tar.gz
    1.16  2ae13aa17d0dc95ce254a52f1dba10929763a10d  xz-java-1.2.tar.gz
    1.17  4530a1aa6f4498ee3d78d6000fa71a3f63bd077f  yices-1.0.28.tar.gz
    1.18  12ae71acde43bd7bed1e005c43034b208c0cba4c  z3-3.2.tar.gz
     2.1 --- a/Admin/components/main	Wed Sep 11 23:32:47 2013 +0200
     2.2 +++ b/Admin/components/main	Thu Sep 12 13:23:54 2013 +0200
     2.3 @@ -5,10 +5,10 @@
     2.4  Haskabelle-2013
     2.5  jdk-7u25
     2.6  jedit_build-20130910
     2.7 -jfreechart-1.0.14
     2.8 +jfreechart-1.0.14-1
     2.9  kodkodi-1.5.2
    2.10  polyml-5.5.0-3
    2.11  scala-2.10.2
    2.12  spass-3.8ds
    2.13  z3-3.2
    2.14 -xz-java-1.2
    2.15 +xz-java-1.2-1
     3.1 --- a/etc/settings	Wed Sep 11 23:32:47 2013 +0200
     3.2 +++ b/etc/settings	Thu Sep 12 13:23:54 2013 +0200
     3.3 @@ -15,6 +15,13 @@
     3.4  
     3.5  ISABELLE_JAVA_SYSTEM_OPTIONS="-Dfile.encoding=UTF-8 -server"
     3.6  
     3.7 +classpath "$ISABELLE_HOME/lib/classes/ext/Pure.jar"
     3.8 +classpath "$ISABELLE_HOME/lib/classes/ext/scala-library.jar"
     3.9 +classpath "$ISABELLE_HOME/lib/classes/ext/scala-swing.jar"
    3.10 +classpath "$ISABELLE_HOME/lib/classes/ext/scala-actors.jar"
    3.11 +classpath "$ISABELLE_HOME/lib/classes/ext/scala-compiler.jar"
    3.12 +classpath "$ISABELLE_HOME/lib/classes/ext/scala-reflect.jar"
    3.13 +
    3.14  
    3.15  ###
    3.16  ### Interactive sessions (cf. isabelle tty)
     4.1 --- a/lib/Tools/java	Wed Sep 11 23:32:47 2013 +0200
     4.2 +++ b/lib/Tools/java	Thu Sep 12 13:23:54 2013 +0200
     4.3 @@ -4,9 +4,8 @@
     4.4  #
     4.5  # DESCRIPTION: invoke Java within the Isabelle environment
     4.6  
     4.7 -CLASSPATH="$(jvmpath "$CLASSPATH")"
     4.8 +declare -a JAVA_ARGS; eval "JAVA_ARGS=($ISABELLE_JAVA_SYSTEM_OPTIONS)"
     4.9  
    4.10 -declare -a JAVA_ARGS; eval "JAVA_ARGS=($ISABELLE_JAVA_SYSTEM_OPTIONS)"
    4.11  isabelle_jdk java "${JAVA_ARGS[@]}" \
    4.12 -  "-Djava.ext.dirs=$(jvmpath "$ISABELLE_JAVA_EXT:$ISABELLE_HOME/lib/classes/ext")" "$@"
    4.13 +  -classpath "$(jvmpath "$ISABELLE_CLASSPATH")" "$@"
    4.14  
     5.1 --- a/lib/Tools/scala	Wed Sep 11 23:32:47 2013 +0200
     5.2 +++ b/lib/Tools/scala	Thu Sep 12 13:23:54 2013 +0200
     5.3 @@ -6,6 +6,6 @@
     5.4  
     5.5  isabelle_admin_build jars || exit $?
     5.6  
     5.7 -CLASSPATH="$(jvmpath "$CLASSPATH")"
     5.8  isabelle_scala scala -Dfile.encoding=UTF-8 \
     5.9 -  "-Djava.ext.dirs=$(jvmpath "$ISABELLE_JAVA_EXT:$ISABELLE_HOME/lib/classes/ext")" "$@"
    5.10 +  -classpath "$(jvmpath "$ISABELLE_CLASSPATH")" "$@"
    5.11 +
     6.1 --- a/lib/Tools/scalac	Wed Sep 11 23:32:47 2013 +0200
     6.2 +++ b/lib/Tools/scalac	Thu Sep 12 13:23:54 2013 +0200
     6.3 @@ -6,7 +6,6 @@
     6.4  
     6.5  isabelle_admin_build jars || exit $?
     6.6  
     6.7 -CLASSPATH="$(jvmpath "$CLASSPATH")"
     6.8  isabelle_scala scalac -Dfile.encoding=UTF-8 \
     6.9 -  "-Djava.ext.dirs=$(jvmpath "$ISABELLE_JAVA_EXT:$ISABELLE_HOME/lib/classes/ext")" "$@"
    6.10 +  -classpath "$(jvmpath "$ISABELLE_CLASSPATH")" "$@"
    6.11  
     7.1 --- a/lib/scripts/getsettings	Wed Sep 11 23:32:47 2013 +0200
     7.2 +++ b/lib/scripts/getsettings	Thu Sep 12 13:23:54 2013 +0200
     7.3 @@ -21,16 +21,20 @@
     7.4    ISABELLE_HOME_WINDOWS="$(cygpath -w "$(dirname "$ISABELLE_HOME")")\\$(basename "$ISABELLE_HOME")"
     7.5    ISABELLE_HOME="$(cygpath -u "$ISABELLE_HOME_WINDOWS")"
     7.6  
     7.7 -  CLASSPATH="$(cygpath -i -u -p "$CLASSPATH")"
     7.8    function jvmpath() { cygpath -i -C UTF8 -w -p "$@"; }
     7.9    CYGWIN_ROOT="$(jvmpath "/")"
    7.10 +
    7.11 +  ISABELLE_CLASSPATH="$(cygpath -i -u -p "$CLASSPATH")"
    7.12 +  unset CLASSPATH
    7.13  else
    7.14    if [ -z "$USER_HOME" ]; then
    7.15      USER_HOME="$HOME"
    7.16    fi
    7.17  
    7.18    function jvmpath() { echo "$@"; }
    7.19 -  CLASSPATH="$CLASSPATH"
    7.20 +
    7.21 +  ISABELLE_CLASSPATH="$CLASSPATH"
    7.22 +  unset CLASSPATH
    7.23  fi
    7.24  
    7.25  export ISABELLE_HOME
    7.26 @@ -122,18 +126,18 @@
    7.27    function isabelle_admin_build () { return 0; }
    7.28  fi
    7.29  
    7.30 -#CLASSPATH convenience
    7.31 +#classpath
    7.32  function classpath ()
    7.33  {
    7.34    for X in "$@"
    7.35    do
    7.36 -    if [ -z "$CLASSPATH" ]; then
    7.37 -      CLASSPATH="$X"
    7.38 +    if [ -z "$ISABELLE_CLASSPATH" ]; then
    7.39 +      ISABELLE_CLASSPATH="$X"
    7.40      else
    7.41 -      CLASSPATH="$X:$CLASSPATH"
    7.42 +      ISABELLE_CLASSPATH="$X:$ISABELLE_CLASSPATH"
    7.43      fi
    7.44    done
    7.45 -  export CLASSPATH
    7.46 +  export ISABELLE_CLASSPATH
    7.47  }
    7.48  
    7.49  #arrays
     8.1 --- a/src/Doc/System/Scala.thy	Wed Sep 11 23:32:47 2013 +0200
     8.2 +++ b/src/Doc/System/Scala.thy	Thu Sep 12 13:23:54 2013 +0200
     8.3 @@ -61,10 +61,10 @@
     8.4  
     8.5    This allows to compile further Scala modules, depending on existing
     8.6    Isabelle/Scala functionality.  The resulting class or jar files can
     8.7 -  be added to the @{setting CLASSPATH} via the @{verbatim classpath}
     8.8 -  Bash function that is provided by the Isabelle process environment.
     8.9 -  Thus add-on components can register themselves in a modular manner,
    8.10 -  see also \secref{sec:components}.
    8.11 +  be added to the Java classpath the @{verbatim classpath} Bash
    8.12 +  function that is provided by the Isabelle process environment.  Thus
    8.13 +  add-on components can register themselves in a modular manner, see
    8.14 +  also \secref{sec:components}.
    8.15  
    8.16    Note that jEdit (\secref{sec:tool-jedit}) has its own mechanisms for
    8.17    adding plugin components, which needs special attention since
     9.1 --- a/src/Pure/build-jars	Wed Sep 11 23:32:47 2013 +0200
     9.2 +++ b/src/Pure/build-jars	Thu Sep 12 13:23:54 2013 +0200
     9.3 @@ -140,15 +140,6 @@
     9.4  [ "$#" -ne 0 ] && usage
     9.5  
     9.6  
     9.7 -## dependencies
     9.8 -
     9.9 -declare -a JFREECHART_JARS=()
    9.10 -for NAME in $JFREECHART_JAR_NAMES
    9.11 -do
    9.12 -  JFREECHART_JARS["${#JFREECHART_JARS[@]}"]="$JFREECHART_HOME/lib/$NAME"
    9.13 -done
    9.14 -
    9.15 -
    9.16  ## build
    9.17  
    9.18  TARGET_DIR="$ISABELLE_HOME/lib/classes"
    9.19 @@ -203,14 +194,10 @@
    9.20  
    9.21    SCALAC_OPTIONS="$ISABELLE_SCALA_BUILD_OPTIONS -d classes"
    9.22  
    9.23 -  JFXRT="$ISABELLE_JDK_HOME/jre/lib/jfxrt.jar"
    9.24 -
    9.25    (
    9.26 -    for X in "$JFXRT" "${JFREECHART_JARS[@]}" "$XZ_JAVA_HOME/lib/xz.jar" classes
    9.27 -    do
    9.28 -      CLASSPATH="$CLASSPATH:$X"
    9.29 -    done
    9.30 -    CLASSPATH="$(jvmpath "$CLASSPATH")"
    9.31 +    classpath "$ISABELLE_JDK_HOME/jre/lib/jfxrt.jar"
    9.32 +    classpath classes
    9.33 +    export CLASSPATH="$(jvmpath "$ISABELLE_CLASSPATH")"
    9.34  
    9.35      if [ "$TEST_PIDE" = true ]; then
    9.36        isabelle_scala scalac $SCALAC_OPTIONS "${PIDE_SOURCES[@]}" || \
    10.1 --- a/src/Tools/Graphview/lib/Tools/graphview	Wed Sep 11 23:32:47 2013 +0200
    10.2 +++ b/src/Tools/Graphview/lib/Tools/graphview	Thu Sep 12 13:23:54 2013 +0200
    10.3 @@ -143,8 +143,8 @@
    10.4      function stty() { :; }
    10.5      export -f stty
    10.6  
    10.7 -    CLASSPATH="$CLASSPATH:$PURE_JAR"
    10.8 -    CLASSPATH="$(jvmpath "$CLASSPATH")"
    10.9 +    classpath "$PURE_JAR"
   10.10 +    export CLASSPATH="$(jvmpath "$ISABELLE_CLASSPATH")"
   10.11      exec "$SCALA_HOME/bin/scalac" $ISABELLE_SCALA_BUILD_OPTIONS -d classes "${SOURCES[@]}"
   10.12    ) || fail "Failed to compile sources"
   10.13  
    11.1 --- a/src/Tools/jEdit/lib/Tools/jedit	Wed Sep 11 23:32:47 2013 +0200
    11.2 +++ b/src/Tools/jEdit/lib/Tools/jedit	Thu Sep 12 13:23:54 2013 +0200
    11.3 @@ -216,12 +216,6 @@
    11.4    "$ISABELLE_JEDIT_BUILD_HOME/contrib/jsr305-2.0.0.jar"
    11.5  )
    11.6  
    11.7 -declare -a JFREECHART_JARS=()
    11.8 -for NAME in $JFREECHART_JAR_NAMES
    11.9 -do
   11.10 -  JFREECHART_JARS["${#JFREECHART_JARS[@]}"]="$JFREECHART_HOME/lib/$NAME"
   11.11 -done
   11.12 -
   11.13  
   11.14  # target
   11.15  
   11.16 @@ -238,8 +232,8 @@
   11.17    else
   11.18      if [ -n "$ISABELLE_JEDIT_BUILD_HOME" ]; then
   11.19        declare -a DEPS=(
   11.20 -        "$JEDIT_JAR" "${JEDIT_JARS[@]}" "${JFREECHART_JARS[@]}" "$XZ_JAVA_HOME/lib/xz.jar"
   11.21 -        "$PURE_JAR" "$GRAPHVIEW_JAR" "${SOURCES[@]}" "${RESOURCES[@]}"
   11.22 +        "$JEDIT_JAR" "${JEDIT_JARS[@]}" "$PURE_JAR" "$GRAPHVIEW_JAR"
   11.23 +        "${SOURCES[@]}" "${RESOURCES[@]}"
   11.24        )
   11.25      elif [ -e "$ISABELLE_HOME/Admin/build" ]; then
   11.26        declare -a DEPS=("$PURE_JAR" "$GRAPHVIEW_JAR" "${SOURCES[@]}" "${RESOURCES[@]}")
   11.27 @@ -297,12 +291,11 @@
   11.28      function stty() { :; }
   11.29      export -f stty
   11.30  
   11.31 -    for JAR in "$JEDIT_JAR" "${JEDIT_JARS[@]}" "${JFREECHART_JARS[@]}" \
   11.32 -      "$XZ_JAVA_HOME/lib/xz.jar" "$PURE_JAR" "$GRAPHVIEW_JAR" "$SCALA_HOME/lib/scala-compiler.jar"
   11.33 +    for JAR in "$JEDIT_JAR" "${JEDIT_JARS[@]}" "$PURE_JAR" "$GRAPHVIEW_JAR"
   11.34      do
   11.35 -      CLASSPATH="$CLASSPATH:$JAR"
   11.36 +      classpath "$JAR"
   11.37      done
   11.38 -    CLASSPATH="$(jvmpath "$CLASSPATH")"
   11.39 +    export CLASSPATH="$(jvmpath "$ISABELLE_CLASSPATH")"
   11.40      exec "$SCALA_HOME/bin/scalac" $ISABELLE_SCALA_BUILD_OPTIONS -d dist/classes "${SOURCES[@]}"
   11.41    ) || fail "Failed to compile sources"
   11.42  
   11.43 @@ -317,9 +310,9 @@
   11.44  
   11.45  ## main
   11.46  
   11.47 -if [ "$BUILD_ONLY" = false ]; then
   11.48 +if [ "$BUILD_ONLY" = false ]
   11.49 +then
   11.50    export JEDIT_SESSION_DIRS JEDIT_LOGIC JEDIT_PRINT_MODE JEDIT_BUILD_MODE
   11.51 -
   11.52 -  exec "$ISABELLE_TOOL" java "${JAVA_ARGS[@]}" \
   11.53 -    -classpath "$(jvmpath "$JEDIT_HOME/dist/jedit.jar")" isabelle.Main "${ARGS[@]}"
   11.54 +  classpath "$JEDIT_HOME/dist/jedit.jar"
   11.55 +  exec "$ISABELLE_TOOL" java "${JAVA_ARGS[@]}" isabelle.Main "${ARGS[@]}"
   11.56  fi