isabelle java: prefer -server here;
authorwenzelm
Wed, 22 Dec 2010 11:52:57 +0100
changeset 41380 92237dee0f29
parent 41379 b31d7a1cd08f
child 41381 77990a6cd558
isabelle java: prefer -server here;
lib/Tools/java
src/Tools/jEdit/dist-template/lib/Tools/jedit
--- 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)"