more robust java.ext.dirs: avoid picking up accidental jars from system directories;
authorwenzelm
Tue Jan 23 16:37:57 2018 +0100 (20 months ago)
changeset 67490982f0bf34804
parent 67488 3d33847dc911
child 67491 59527ee2d6da
more robust java.ext.dirs: avoid picking up accidental jars from system directories;
Admin/Linux/Isabelle.run
Admin/MacOS/Info.plist-part2
Admin/Windows/launch4j/isabelle.xml
bin/isabelle_java
lib/Tools/java
lib/Tools/scala
lib/Tools/scalac
     1.1 --- a/Admin/Linux/Isabelle.run	Mon Jan 22 22:45:45 2018 +0100
     1.2 +++ b/Admin/Linux/Isabelle.run	Tue Jan 23 16:37:57 2018 +0100
     1.3 @@ -34,6 +34,7 @@
     1.4  
     1.5  exec "$ISABELLE_HOME/contrib/jdk/${ISABELLE_PLATFORM64:-$ISABELLE_PLATFORM32}/jre/bin/java" \
     1.6    "-Disabelle.root=$ISABELLE_HOME" "${JAVA_OPTIONS[@]}" \
     1.7 +  "-Djava.ext.dirs=$ISABELLE_HOME/contrib/jdk/${ISABELLE_PLATFORM64:-$ISABELLE_PLATFORM32}/jre/lib/ext" \
     1.8    -classpath "{CLASSPATH}" \
     1.9    "-splash:$ISABELLE_HOME/lib/logo/isabelle.gif" \
    1.10    isabelle.Main "$@"
     2.1 --- a/Admin/MacOS/Info.plist-part2	Mon Jan 22 22:45:45 2018 +0100
     2.2 +++ b/Admin/MacOS/Info.plist-part2	Tue Jan 23 16:37:57 2018 +0100
     2.3 @@ -1,4 +1,5 @@
     2.4  <string>-Disabelle.root=$APP_ROOT/Contents/Resources/{ISABELLE_NAME}</string>
     2.5 +<string>-Djava.ext.dirs=$APP_ROOT/Contents/Resources/{ISABELLE_NAME}/contrib/jdk/x86_64-darwin/Contents/Home/jre/lib/ext</string>
     2.6  <string>-Disabelle.app=true</string>
     2.7  </array>
     2.8  <key>JVMArguments</key>
     3.1 --- a/Admin/Windows/launch4j/isabelle.xml	Mon Jan 22 22:45:45 2018 +0100
     3.2 +++ b/Admin/Windows/launch4j/isabelle.xml	Tue Jan 23 16:37:57 2018 +0100
     3.3 @@ -30,7 +30,7 @@
     3.4      <maxVersion></maxVersion>
     3.5      <jdkPreference>jdkOnly</jdkPreference>
     3.6      <runtimeBits>64</runtimeBits>
     3.7 -    <opt>-Disabelle.root=&quot;%EXEDIR%&quot; -Dcygwin.root=&quot;%EXEDIR%\contrib\cygwin&quot;</opt>
     3.8 +    <opt>-Disabelle.root=&quot;%EXEDIR%&quot; -Djava.ext.dirs=&quot;%EXEDIR%\contrib\jdk\x86_64-windows\jre\lib\ext&quot; -Dcygwin.root=&quot;%EXEDIR%\contrib\cygwin&quot;</opt>
     3.9    </jre>
    3.10    <splash>
    3.11      <file>{SPLASH}</file>
     4.1 --- a/bin/isabelle_java	Mon Jan 22 22:45:45 2018 +0100
     4.2 +++ b/bin/isabelle_java	Tue Jan 23 16:37:57 2018 +0100
     4.3 @@ -66,6 +66,8 @@
     4.4    else
     4.5      unset ISABELLE_HOME
     4.6      unset CLASSPATH
     4.7 -    exec "$JAVA_HOME/bin/java" "${JAVA_ARGS[@]}" -classpath "$ISABELLE_CLASSPATH" "$@"
     4.8 +    exec "$JAVA_HOME/bin/java" "${JAVA_ARGS[@]}" \
     4.9 +      "-Djava.ext.dirs=$JAVA_HOME/lib/ext" \
    4.10 +      -classpath "$ISABELLE_CLASSPATH" "$@"
    4.11    fi
    4.12  }
     5.1 --- a/lib/Tools/java	Mon Jan 22 22:45:45 2018 +0100
     5.2 +++ b/lib/Tools/java	Tue Jan 23 16:37:57 2018 +0100
     5.3 @@ -10,4 +10,5 @@
     5.4  unset CLASSPATH
     5.5  
     5.6  isabelle_java java "${JAVA_ARGS[@]}" \
     5.7 +  "-Djava.ext.dirs=$(platform_path "$ISABELLE_JDK_HOME/jre/lib/ext")" \
     5.8    -classpath "$(platform_path "$ISABELLE_CLASSPATH")" "$@"
     6.1 --- a/lib/Tools/scala	Mon Jan 22 22:45:45 2018 +0100
     6.2 +++ b/lib/Tools/scala	Tue Jan 23 16:37:57 2018 +0100
     6.3 @@ -14,4 +14,5 @@
     6.4  done
     6.5  
     6.6  isabelle_scala scala "${SCALA_ARGS[@]}" \
     6.7 +  "-Djava.ext.dirs=$(platform_path "$ISABELLE_JDK_HOME/jre/lib/ext")" \
     6.8    -classpath "$(platform_path "$ISABELLE_CLASSPATH")" "$@"
     7.1 --- a/lib/Tools/scalac	Mon Jan 22 22:45:45 2018 +0100
     7.2 +++ b/lib/Tools/scalac	Tue Jan 23 16:37:57 2018 +0100
     7.3 @@ -7,5 +7,5 @@
     7.4  isabelle_admin_build jars || exit $?
     7.5  
     7.6  isabelle_scala scalac -Dfile.encoding=UTF-8 \
     7.7 +  "-Djava.ext.dirs=$(platform_path "$ISABELLE_JDK_HOME/jre/lib/ext")" \
     7.8    -classpath "$(platform_path "$ISABELLE_CLASSPATH")" "$@"
     7.9 -