lib/Tools/scala
author wenzelm
Wed, 31 Mar 2021 11:24:46 +0200
changeset 73772 d3f2038198ae
parent 72108 f92c7e2ba8da
child 74252 678e1c9eb009
permissions -rwxr-xr-x
clarified (again): local tip could be actually more recent;

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

isabelle_admin_build jars || exit $?

eval "declare -a JAVA_ARGS=($ISABELLE_JAVA_SYSTEM_OPTIONS)"
declare -a SCALA_ARGS=()
for ARG in "${JAVA_ARGS[@]}"
do
  SCALA_ARGS["${#SCALA_ARGS[@]}"]="-J$ARG"
done

[ -n "$CLASSPATH" ] && classpath "$CLASSPATH"
unset CLASSPATH

isabelle_scala scala "${SCALA_ARGS[@]}" \
  -classpath "$(platform_path "$ISABELLE_CLASSPATH")" \
  -Disabelle.scala.classpath="$(platform_path "$ISABELLE_CLASSPATH")" "$@"