author | wenzelm |
Sat, 24 Mar 2012 20:24:16 +0100 | |
changeset 47113 | b5a5662528fb |
parent 45385 | 7c1375ba1424 |
child 47115 | 1a05adae1cc9 |
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 |
|
47113
b5a5662528fb
ISABELLE_JDK_HOME settings variable points to JDK with javac and jar (not just JRE);
wenzelm
parents:
45385
diff
changeset
|
9 |
JAVA_EXE="$ISABELLE_JDK_HOME/bin/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 \ |
45385
7c1375ba1424
offline build of java_ext_dirs.jar, to avoid runtime dependency on javac/jar executables;
wenzelm
parents:
45105
diff
changeset
|
25 |
"-Djava.ext.dirs=$("$ISABELLE_HOME/src/Tools/JVM/java_ext_dirs")" "$@" |
43521
d477b92109b8
provide Isabelle/Scala environment as Java extension, instead of user classpath
wenzelm
parents:
41622
diff
changeset
|
26 |