diff -r b31d7a1cd08f -r 92237dee0f29 lib/Tools/java --- 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 +