--- a/lib/Tools/java Tue Dec 21 21:54:51 2010 +0100
+++ b/lib/Tools/java Wed Dec 22 11:52:57 2010 +0100
@@ -5,4 +5,12 @@
# DESCRIPTION: invoke Java within the Isabelle environment
CLASSPATH="$(jvmpath "$CLASSPATH")"
-exec "${THIS_JAVA:-$ISABELLE_JAVA}" "$@"
+
+JAVA_EXE="${THIS_JAVA:-$ISABELLE_JAVA}"
+if "$JAVA_EXE" -server >/dev/null 2>/dev/null
+then
+ exec "$JAVA_EXE" -server "$@"
+else
+ exec "$JAVA_EXE" "$@"
+fi
+
--- a/src/Tools/jEdit/dist-template/lib/Tools/jedit Tue Dec 21 21:54:51 2010 +0100
+++ b/src/Tools/jEdit/dist-template/lib/Tools/jedit Wed Dec 22 11:52:57 2010 +0100
@@ -78,9 +78,6 @@
declare -a JAVA_ARGS; eval "JAVA_ARGS=($JEDIT_JAVA_OPTIONS $JEDIT_SYSTEM_OPTIONS)"
[ -n "$SCALA_HOME" ] && JAVA_ARGS["${#JAVA_ARGS[@]}"]="-Dscala.home=$SCALA_HOME"
-"$ISABELLE_TOOL" java -server >/dev/null 2>/dev/null && \
- JAVA_ARGS["${#JAVA_ARGS[@]}"]="-server"
-
declare -a ARGS; eval "ARGS=($JEDIT_OPTIONS)"
declare -a OPTIONS; eval "OPTIONS=($ISABELLE_JEDIT_OPTIONS)"