lib/Tools/java
author wenzelm
Mon, 26 Mar 2012 16:25:08 +0200
changeset 47115 1a05adae1cc9
parent 47113 b5a5662528fb
child 47465 71d5f37ee2bf
permissions -rwxr-xr-x
more robust command invocation via ISABELLE_JDK_HOME or SCALA_HOME (NB: bash exec requires genuine executable, not function);

#!/usr/bin/env bash
#
# Author: Makarius
#
# DESCRIPTION: invoke Java within the Isabelle environment

CLASSPATH="$(jvmpath "$CLASSPATH")"

if isabelle_jdk java -server >/dev/null 2>/dev/null; then
  SERVER="-server"
else
  SERVER=""
fi

exec "$ISABELLE_JDK_HOME/bin/java" -Dfile.encoding=UTF-8 $SERVER \
  "-Djava.ext.dirs=$("$ISABELLE_HOME/src/Tools/JVM/java_ext_dirs")" "$@"