lib/Tools/scala
author wenzelm
Wed, 31 Jan 2024 12:43:06 +0100
changeset 79556 0631dfc0db07
parent 76343 6a6f650cc5a2
child 79561 4838fcbd019b
permissions -rwxr-xr-x
more robust check of ISABELLE_PLATFORM_FAMILY within settings environment, to support its reunification with Isabelle/Scala (see also a33a6e541cbb, f3a356c64193);

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

isabelle scala_build || exit $?

classpath "$ISABELLE_SETUP_CLASSPATH"; unset ISABELLE_SETUP_CLASSPATH
classpath "$CLASSPATH"; export CLASSPATH=""

export jvm_cp_args="$(platform_path "$ISABELLE_CLASSPATH")"
export JAVA_OPTS="$ISABELLE_JAVA_SYSTEM_OPTIONS -J-Dscala.usejavacp=true"

case "$ISABELLE_PLATFORM_FAMILY" in
  windows*)
    export TERM=dumb
    ;;
fi

isabelle_scala scala $ISABELLE_SCALAC_OPTIONS "$@"