Skip to content
Snippets Groups Projects
Unverified Commit 440ed388 authored by Cam Saul's avatar Cam Saul
Browse files

Java 9 fix: add java.xml.bind module back to classpath :wrench:

parent 099b6975
Branches
Tags
No related merge requests found
......@@ -117,6 +117,7 @@ JAVA_OPTS="${JAVA_OPTS} -XX:+CMSClassUnloadingEnabled" # These two
JAVA_OPTS="${JAVA_OPTS} -XX:+UseConcMarkSweepGC"
JAVA_OPTS="${JAVA_OPTS} -server"
JAVA_OPTS="${JAVA_OPTS} --add-opens=java.base/java.net=ALL-UNNAMED" # needed for Java 9 to allow dynamic classpath additions -- see https://github.com/tobias/dynapath
JAVA_OPTS="${JAVA_OPTS} --add-modules=java.xml.bind" # needed for Java 9 (Oracle VM only) because java.xml.bind is no longer on SE classpath by default since it's EE
if [ ! -z "$JAVA_TIMEZONE" ]; then
JAVA_OPTS="${JAVA_OPTS} -Duser.timezone=${JAVA_TIMEZONE}"
......
......@@ -85,5 +85,6 @@ fi
JAVA_OPTS="${JAVA_OPTS} -XX:+IgnoreUnrecognizedVMOptions"
JAVA_OPTS="${JAVA_OPTS} -Dfile.encoding=UTF-8"
JAVA_OPTS="${JAVA_OPTS} --add-opens=java.base/java.net=ALL-UNNAMED"
JAVA_OPTS="${JAVA_OPTS} --add-modules=java.xml.bind"
exec java $JAVA_OPTS -jar ./target/uberjar/metabase.jar
......@@ -110,6 +110,7 @@
"-XX:+CMSClassUnloadingEnabled" ; let Clojure's dynamically generated temporary classes be GC'ed from PermGen
"-XX:+UseConcMarkSweepGC" ; Concurrent Mark Sweep GC needs to be used for Class Unloading (above)
"--add-opens=java.base/java.net=ALL-UNNAMED" ; let Java 9 dynamically add to classpath -- see https://github.com/tobias/dynapath#note-on-java-9
"--add-modules=java.xml.bind" ; tell Java 9 (Oracle VM only) to add java.xml.bind to classpath. No longer on it by default. See https://stackoverflow.com/questions/43574426/how-to-resolve-java-lang-noclassdeffounderror-javax-xml-bind-jaxbexception-in-j
"-Djava.awt.headless=true"] ; prevent Java icon from randomly popping up in dock when running `lein ring server`
:javac-options ["-target" "1.7", "-source" "1.7"]
:uberjar-name "metabase.jar"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment