provide Isabelle/Scala environment as Java extension, instead of user classpath
authorwenzelm
Thu Jun 23 16:10:22 2011 +0200 (2011-06-23)
changeset 43521d477b92109b8
parent 43520 cec9b95fa35d
child 43522 2562d6c81b03
provide Isabelle/Scala environment as Java extension, instead of user classpath
(which is subject to adhoc changes);
Admin/build
Isabelle
etc/settings
lib/Tools/java
lib/Tools/scala
lib/scripts/java_ext_dirs
src/Pure/build-jars
src/Tools/jEdit/lib/Tools/jedit
     1.1 --- a/Admin/build	Thu Jun 23 14:52:32 2011 +0200
     1.2 +++ b/Admin/build	Thu Jun 23 16:10:22 2011 +0200
     1.3 @@ -84,6 +84,7 @@
     1.4  
     1.5  function build_jars ()
     1.6  {
     1.7 +  "$ISABELLE_HOME/lib/scripts/java_ext_dirs" >/dev/null
     1.8    pushd "$ISABELLE_HOME/src/Pure" >/dev/null
     1.9    "$ISABELLE_TOOL" env ./build-jars "$@" || exit $?
    1.10    popd >/dev/null
     2.1 --- a/Isabelle	Thu Jun 23 14:52:32 2011 +0200
     2.2 +++ b/Isabelle	Thu Jun 23 16:10:22 2011 +0200
     2.3 @@ -26,4 +26,4 @@
     2.4  CLASSPATH="$(jvmpath "$CLASSPATH")"
     2.5  exec "$ISABELLE_TOOL" java \
     2.6    "-Disabelle.home=$(jvmpath "$ISABELLE_HOME")" \
     2.7 -  -jar "$(jvmpath "$ISABELLE_HOME/lib/classes/isabelle-scala.jar")" "$@"
     2.8 +  isabelle.GUI_Setup "$@"
     3.1 --- a/etc/settings	Thu Jun 23 14:52:32 2011 +0200
     3.2 +++ b/etc/settings	Thu Jun 23 16:10:22 2011 +0200
     3.3 @@ -62,8 +62,6 @@
     3.4    ISABELLE_JAVA="java"
     3.5  fi
     3.6  
     3.7 -classpath "$ISABELLE_HOME/lib/classes/Pure.jar"
     3.8 -
     3.9  
    3.10  ###
    3.11  ### Interactive sessions (cf. isabelle tty)
     4.1 --- a/lib/Tools/java	Thu Jun 23 14:52:32 2011 +0200
     4.2 +++ b/lib/Tools/java	Thu Jun 23 16:10:22 2011 +0200
     4.3 @@ -7,10 +7,13 @@
     4.4  CLASSPATH="$(jvmpath "$CLASSPATH")"
     4.5  
     4.6  JAVA_EXE="${THIS_JAVA:-$ISABELLE_JAVA}"
     4.7 -if "$JAVA_EXE" -server >/dev/null 2>/dev/null
     4.8 -then
     4.9 -  exec "$JAVA_EXE" -Dfile.encoding=UTF-8 -server "$@"
    4.10 +
    4.11 +if "$JAVA_EXE" -server >/dev/null 2>/dev/null; then
    4.12 +  SERVER="-server"
    4.13  else
    4.14 -  exec "$JAVA_EXE" -Dfile.encoding=UTF-8 "$@"
    4.15 +  SERVER=""
    4.16  fi
    4.17  
    4.18 +exec "$JAVA_EXE" -Dfile.encoding=UTF-8 $SERVER \
    4.19 +  "-Djava.ext.dirs=$("$ISABELLE_HOME/lib/scripts/java_ext_dirs")" "$@"
    4.20 +
     5.1 --- a/lib/Tools/scala	Thu Jun 23 14:52:32 2011 +0200
     5.2 +++ b/lib/Tools/scala	Thu Jun 23 16:10:22 2011 +0200
     5.3 @@ -9,4 +9,5 @@
     5.4  [ -e "$ISABELLE_HOME/Admin/build" ] && { "$ISABELLE_HOME/Admin/build" jars || exit $?; }
     5.5  
     5.6  CLASSPATH="$(jvmpath "$CLASSPATH")"
     5.7 -exec "$SCALA_HOME/bin/scala" -Dfile.encoding=UTF-8 "$@"
     5.8 +exec "$SCALA_HOME/bin/scala" -Dfile.encoding=UTF-8 \
     5.9 +  "-Djava.ext.dirs=$("$ISABELLE_HOME/lib/scripts/java_ext_dirs")" "$@"
     6.1 --- a/lib/scripts/java_ext_dirs	Thu Jun 23 14:52:32 2011 +0200
     6.2 +++ b/lib/scripts/java_ext_dirs	Thu Jun 23 16:10:22 2011 +0200
     6.3 @@ -36,5 +36,6 @@
     6.4  ## main
     6.5  
     6.6  JAVA_EXE="${THIS_JAVA:-$ISABELLE_JAVA}"
     6.7 -exec "$JAVA_EXE" -classpath "$(jvmpath "$TARGET")" isabelle.Java_Ext_Dirs "$@"
     6.8 +exec "$JAVA_EXE" -classpath "$(jvmpath "$TARGET")" isabelle.Java_Ext_Dirs \
     6.9 +  "$(jvmpath "$ISABELLE_HOME/lib/classes/ext")"
    6.10  
     7.1 --- a/src/Pure/build-jars	Thu Jun 23 14:52:32 2011 +0200
     7.2 +++ b/src/Pure/build-jars	Thu Jun 23 16:10:22 2011 +0200
     7.3 @@ -180,6 +180,9 @@
     7.4    jar ufe "$(jvmpath "$FULL_JAR")" isabelle.GUI_Setup isabelle scala || \
     7.5      fail "Failed to produce $FULL_JAR"
     7.6  
     7.7 +  mkdir -p "$TARGET_DIR/ext"
     7.8 +  cp "$FULL_JAR" "$TARGET_DIR/ext/"
     7.9 +
    7.10    popd >/dev/null
    7.11  
    7.12    rm -rf classes
     8.1 --- a/src/Tools/jEdit/lib/Tools/jedit	Thu Jun 23 14:52:32 2011 +0200
     8.2 +++ b/src/Tools/jEdit/lib/Tools/jedit	Thu Jun 23 16:10:22 2011 +0200
     8.3 @@ -234,14 +234,13 @@
     8.4        print qq,<MODE NAME="scala" FILE="scala.xml" FILE_NAME_GLOB="*.scala" />\n\n,; }
     8.5      print; }' dist/modes/catalog
     8.6  
     8.7 -  cp -a "${JEDIT_JARS[@]}" "${SCALA_JARS[@]}" "$PURE_JAR" dist/jars/. || failed
     8.8 +  cp -a "${JEDIT_JARS[@]}" "$SCALA_HOME/lib/scala-compiler.jar" dist/jars/. || failed
     8.9    (
    8.10 -    for JAR in "$JEDIT_JAR" "${JEDIT_JARS[@]}" "$SCALA_HOME/lib/scala-compiler.jar"
    8.11 +    for JAR in "$JEDIT_JAR" "${JEDIT_JARS[@]}" "$PURE_JAR" "$SCALA_HOME/lib/scala-compiler.jar"
    8.12      do
    8.13        CLASSPATH="$CLASSPATH:$JAR"
    8.14      done
    8.15      CLASSPATH="$(jvmpath "$CLASSPATH")"
    8.16 -
    8.17      exec "$SCALA_HOME/bin/scalac" -unchecked -deprecation \
    8.18        -d dist/classes -target:jvm-1.5 "${SOURCES[@]}"
    8.19    ) || fail "Failed to compile sources"