author | wenzelm |
Tue, 04 Oct 2011 14:51:51 +0200 | |
changeset 45105 | 21c09b727bf3 |
parent 43521 | d477b92109b8 |
child 45385 | 7c1375ba1424 |
permissions | -rwxr-xr-x |
27914 | 1 |
#!/usr/bin/env bash |
2 |
# |
|
3 |
# Author: Makarius |
|
4 |
# |
|
27916 | 5 |
# DESCRIPTION: invoke Java within the Isabelle environment |
27914 | 6 |
|
7 |
CLASSPATH="$(jvmpath "$CLASSPATH")" |
|
41380 | 8 |
|
9 |
JAVA_EXE="${THIS_JAVA:-$ISABELLE_JAVA}" |
|
43521
d477b92109b8
provide Isabelle/Scala environment as Java extension, instead of user classpath
wenzelm
parents:
41622
diff
changeset
|
10 |
|
45105
21c09b727bf3
more explicit check of Java executable -- relevant for Linux x86/x86_64 mismatch and absence on Mac OS Lion;
wenzelm
parents:
43521
diff
changeset
|
11 |
if "$JAVA_EXE" -version >/dev/null 2>/dev/null; then |
21c09b727bf3
more explicit check of Java executable -- relevant for Linux x86/x86_64 mismatch and absence on Mac OS Lion;
wenzelm
parents:
43521
diff
changeset
|
12 |
: |
21c09b727bf3
more explicit check of Java executable -- relevant for Linux x86/x86_64 mismatch and absence on Mac OS Lion;
wenzelm
parents:
43521
diff
changeset
|
13 |
else |
21c09b727bf3
more explicit check of Java executable -- relevant for Linux x86/x86_64 mismatch and absence on Mac OS Lion;
wenzelm
parents:
43521
diff
changeset
|
14 |
echo "Bad Java executable: \"$JAVA_EXE\"" >&2 |
21c09b727bf3
more explicit check of Java executable -- relevant for Linux x86/x86_64 mismatch and absence on Mac OS Lion;
wenzelm
parents:
43521
diff
changeset
|
15 |
exit 2 |
21c09b727bf3
more explicit check of Java executable -- relevant for Linux x86/x86_64 mismatch and absence on Mac OS Lion;
wenzelm
parents:
43521
diff
changeset
|
16 |
fi |
21c09b727bf3
more explicit check of Java executable -- relevant for Linux x86/x86_64 mismatch and absence on Mac OS Lion;
wenzelm
parents:
43521
diff
changeset
|
17 |
|
43521
d477b92109b8
provide Isabelle/Scala environment as Java extension, instead of user classpath
wenzelm
parents:
41622
diff
changeset
|
18 |
if "$JAVA_EXE" -server >/dev/null 2>/dev/null; then |
d477b92109b8
provide Isabelle/Scala environment as Java extension, instead of user classpath
wenzelm
parents:
41622
diff
changeset
|
19 |
SERVER="-server" |
41380 | 20 |
else |
43521
d477b92109b8
provide Isabelle/Scala environment as Java extension, instead of user classpath
wenzelm
parents:
41622
diff
changeset
|
21 |
SERVER="" |
41380 | 22 |
fi |
23 |
||
43521
d477b92109b8
provide Isabelle/Scala environment as Java extension, instead of user classpath
wenzelm
parents:
41622
diff
changeset
|
24 |
exec "$JAVA_EXE" -Dfile.encoding=UTF-8 $SERVER \ |
d477b92109b8
provide Isabelle/Scala environment as Java extension, instead of user classpath
wenzelm
parents:
41622
diff
changeset
|
25 |
"-Djava.ext.dirs=$("$ISABELLE_HOME/lib/scripts/java_ext_dirs")" "$@" |
d477b92109b8
provide Isabelle/Scala environment as Java extension, instead of user classpath
wenzelm
parents:
41622
diff
changeset
|
26 |