provide Isabelle/Scala environment as Java extension, instead of user classpath
(which is subject to adhoc changes);
--- a/Admin/build Thu Jun 23 14:52:32 2011 +0200
+++ b/Admin/build Thu Jun 23 16:10:22 2011 +0200
@@ -84,6 +84,7 @@
function build_jars ()
{
+ "$ISABELLE_HOME/lib/scripts/java_ext_dirs" >/dev/null
pushd "$ISABELLE_HOME/src/Pure" >/dev/null
"$ISABELLE_TOOL" env ./build-jars "$@" || exit $?
popd >/dev/null
--- a/Isabelle Thu Jun 23 14:52:32 2011 +0200
+++ b/Isabelle Thu Jun 23 16:10:22 2011 +0200
@@ -26,4 +26,4 @@
CLASSPATH="$(jvmpath "$CLASSPATH")"
exec "$ISABELLE_TOOL" java \
"-Disabelle.home=$(jvmpath "$ISABELLE_HOME")" \
- -jar "$(jvmpath "$ISABELLE_HOME/lib/classes/isabelle-scala.jar")" "$@"
+ isabelle.GUI_Setup "$@"
--- a/etc/settings Thu Jun 23 14:52:32 2011 +0200
+++ b/etc/settings Thu Jun 23 16:10:22 2011 +0200
@@ -62,8 +62,6 @@
ISABELLE_JAVA="java"
fi
-classpath "$ISABELLE_HOME/lib/classes/Pure.jar"
-
###
### Interactive sessions (cf. isabelle tty)
--- a/lib/Tools/java Thu Jun 23 14:52:32 2011 +0200
+++ b/lib/Tools/java Thu Jun 23 16:10:22 2011 +0200
@@ -7,10 +7,13 @@
CLASSPATH="$(jvmpath "$CLASSPATH")"
JAVA_EXE="${THIS_JAVA:-$ISABELLE_JAVA}"
-if "$JAVA_EXE" -server >/dev/null 2>/dev/null
-then
- exec "$JAVA_EXE" -Dfile.encoding=UTF-8 -server "$@"
+
+if "$JAVA_EXE" -server >/dev/null 2>/dev/null; then
+ SERVER="-server"
else
- exec "$JAVA_EXE" -Dfile.encoding=UTF-8 "$@"
+ SERVER=""
fi
+exec "$JAVA_EXE" -Dfile.encoding=UTF-8 $SERVER \
+ "-Djava.ext.dirs=$("$ISABELLE_HOME/lib/scripts/java_ext_dirs")" "$@"
+
--- a/lib/Tools/scala Thu Jun 23 14:52:32 2011 +0200
+++ b/lib/Tools/scala Thu Jun 23 16:10:22 2011 +0200
@@ -9,4 +9,5 @@
[ -e "$ISABELLE_HOME/Admin/build" ] && { "$ISABELLE_HOME/Admin/build" jars || exit $?; }
CLASSPATH="$(jvmpath "$CLASSPATH")"
-exec "$SCALA_HOME/bin/scala" -Dfile.encoding=UTF-8 "$@"
+exec "$SCALA_HOME/bin/scala" -Dfile.encoding=UTF-8 \
+ "-Djava.ext.dirs=$("$ISABELLE_HOME/lib/scripts/java_ext_dirs")" "$@"
--- a/lib/scripts/java_ext_dirs Thu Jun 23 14:52:32 2011 +0200
+++ b/lib/scripts/java_ext_dirs Thu Jun 23 16:10:22 2011 +0200
@@ -36,5 +36,6 @@
## main
JAVA_EXE="${THIS_JAVA:-$ISABELLE_JAVA}"
-exec "$JAVA_EXE" -classpath "$(jvmpath "$TARGET")" isabelle.Java_Ext_Dirs "$@"
+exec "$JAVA_EXE" -classpath "$(jvmpath "$TARGET")" isabelle.Java_Ext_Dirs \
+ "$(jvmpath "$ISABELLE_HOME/lib/classes/ext")"
--- a/src/Pure/build-jars Thu Jun 23 14:52:32 2011 +0200
+++ b/src/Pure/build-jars Thu Jun 23 16:10:22 2011 +0200
@@ -180,6 +180,9 @@
jar ufe "$(jvmpath "$FULL_JAR")" isabelle.GUI_Setup isabelle scala || \
fail "Failed to produce $FULL_JAR"
+ mkdir -p "$TARGET_DIR/ext"
+ cp "$FULL_JAR" "$TARGET_DIR/ext/"
+
popd >/dev/null
rm -rf classes
--- a/src/Tools/jEdit/lib/Tools/jedit Thu Jun 23 14:52:32 2011 +0200
+++ b/src/Tools/jEdit/lib/Tools/jedit Thu Jun 23 16:10:22 2011 +0200
@@ -234,14 +234,13 @@
print qq,<MODE NAME="scala" FILE="scala.xml" FILE_NAME_GLOB="*.scala" />\n\n,; }
print; }' dist/modes/catalog
- cp -a "${JEDIT_JARS[@]}" "${SCALA_JARS[@]}" "$PURE_JAR" dist/jars/. || failed
+ cp -a "${JEDIT_JARS[@]}" "$SCALA_HOME/lib/scala-compiler.jar" dist/jars/. || failed
(
- for JAR in "$JEDIT_JAR" "${JEDIT_JARS[@]}" "$SCALA_HOME/lib/scala-compiler.jar"
+ for JAR in "$JEDIT_JAR" "${JEDIT_JARS[@]}" "$PURE_JAR" "$SCALA_HOME/lib/scala-compiler.jar"
do
CLASSPATH="$CLASSPATH:$JAR"
done
CLASSPATH="$(jvmpath "$CLASSPATH")"
-
exec "$SCALA_HOME/bin/scalac" -unchecked -deprecation \
-d dist/classes -target:jvm-1.5 "${SOURCES[@]}"
) || fail "Failed to compile sources"