refined scala/java wrappers via isatool;
authorwenzelm
Sat Aug 16 13:31:57 2008 +0200 (2008-08-16)
changeset 279149a7f17370ffb
parent 27913 c347986773eb
child 27915 42581956d75b
refined scala/java wrappers via isatool;
lib/Tools/browser
lib/Tools/java
lib/Tools/scala
lib/scripts/getsettings
     1.1 --- a/lib/Tools/browser	Sat Aug 16 13:31:56 2008 +0200
     1.2 +++ b/lib/Tools/browser	Sat Aug 16 13:31:57 2008 +0200
     1.3 @@ -65,8 +65,7 @@
     1.4  
     1.5  if [ -z "$GRAPHFILE" ]; then
     1.6    [ -d "$ISABELLE_BROWSER_INFO" ] && cd "$ISABELLE_BROWSER_INFO"
     1.7 -  javawrapper GraphBrowser.GraphBrowser
     1.8 -  RC="$?"
     1.9 +  exec "$ISATOOL" java GraphBrowser.GraphBrowser
    1.10  else
    1.11    PRIVATE_FILE="${ISABELLE_TMP:-/tmp}/$$"$(basename "$GRAPHFILE")
    1.12    if [ -n "$CLEAN" ]; then
    1.13 @@ -84,9 +83,9 @@
    1.14    esac
    1.15  
    1.16    if [ -z "$OUTFILE" ]; then
    1.17 -    javawrapper GraphBrowser.GraphBrowser "$(jvmpath "$PRIVATE_FILE")"
    1.18 +    "$ISATOOL" java GraphBrowser.GraphBrowser "$(jvmpath "$PRIVATE_FILE")"
    1.19    else
    1.20 -    javawrapper GraphBrowser.Console "$(jvmpath "$PRIVATE_FILE")" "$(jvmpath "$OUTFILE")"
    1.21 +    "$ISATOOL" java GraphBrowser.Console "$(jvmpath "$PRIVATE_FILE")" "$(jvmpath "$OUTFILE")"
    1.22    fi
    1.23    RC="$?"
    1.24  
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/lib/Tools/java	Sat Aug 16 13:31:57 2008 +0200
     2.3 @@ -0,0 +1,25 @@
     2.4 +#!/usr/bin/env bash
     2.5 +#
     2.6 +# $Id$
     2.7 +# Author: Makarius
     2.8 +#
     2.9 +# DESCRIPTION: Java wrapper
    2.10 +
    2.11 +
    2.12 +PRG="$(basename "$0")"
    2.13 +
    2.14 +function usage()
    2.15 +{
    2.16 +  echo
    2.17 +  echo "Usage: $PRG [ARGS ...]"
    2.18 +  echo
    2.19 +  echo "  Invoke Java within the Isabelle environment."
    2.20 +  echo
    2.21 +  exit 1
    2.22 +}
    2.23 +
    2.24 +
    2.25 +## main
    2.26 +
    2.27 +CLASSPATH="$(jvmpath "$CLASSPATH")"
    2.28 +exec "$ISABELLE_JAVA" "$@"
     3.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.2 +++ b/lib/Tools/scala	Sat Aug 16 13:31:57 2008 +0200
     3.3 @@ -0,0 +1,25 @@
     3.4 +#!/usr/bin/env bash
     3.5 +#
     3.6 +# $Id$
     3.7 +# Author: Makarius
     3.8 +#
     3.9 +# DESCRIPTION: Scala wrapper
    3.10 +
    3.11 +
    3.12 +PRG="$(basename "$0")"
    3.13 +
    3.14 +function usage()
    3.15 +{
    3.16 +  echo
    3.17 +  echo "Usage: $PRG [ARGS ...]"
    3.18 +  echo
    3.19 +  echo "  Invoke Scala within the Isabelle environment."
    3.20 +  echo
    3.21 +  exit 1
    3.22 +}
    3.23 +
    3.24 +
    3.25 +## main
    3.26 +
    3.27 +CLASSPATH="$(jvmpath "$CLASSPATH")"
    3.28 +exec "$ISABELLE_SCALA" "$@"
     4.1 --- a/lib/scripts/getsettings	Sat Aug 16 13:31:56 2008 +0200
     4.2 +++ b/lib/scripts/getsettings	Sat Aug 16 13:31:57 2008 +0200
     4.3 @@ -44,18 +44,13 @@
     4.4    echo "$RESULT"
     4.5  }
     4.6  
     4.7 -#JVM path wrappers
     4.8 +#JVM path wrapper
     4.9  if [ "$OSTYPE" = cygwin ]; then
    4.10    CLASSPATH="$(cygpath -u -p "$CLASSPATH")"
    4.11    function jvmpath() { cygpath -w -p "$@"; }
    4.12 -  function javawrapper() { env CLASSPATH="$(jvmpath "$CLASSPATH")" java "$@"; }
    4.13 -  function scalawrapper() { env CLASSPATH="$(jvmpath "$CLASSPATH")" scala "$@"; }
    4.14  else
    4.15    function jvmpath() { echo "$@"; }
    4.16 -  function javawrapper() { java "$@"; }
    4.17 -  function scalawrapper() { scala "$@"; }
    4.18  fi
    4.19 -ISABELLE_HOME_JVM="$(jvmpath "$ISABELLE_HOME")"
    4.20  
    4.21  #CLASSPATH convenience
    4.22  function classpath () {
    4.23 @@ -87,6 +82,10 @@
    4.24  
    4.25  ISABELLE_OUTPUT="$ISABELLE_OUTPUT/$ML_IDENTIFIER"
    4.26  
    4.27 +#JVM settings
    4.28 +ISABELLE_HOME_JVM="$(jvmpath "$ISABELLE_HOME")"
    4.29 +ISABELLE_HOME_USER_JVM="$(jvmpath "$ISABELLE_HOME_USER")"
    4.30 +
    4.31  set +o allexport
    4.32  
    4.33  fi