JDK9
bonyong lee edited this page Oct 26, 2018
·
1 revision
If your environment is JDK9+, you need to modify a little.
You must add module dependencies to java command in ship script. You can see next in script's last part.
...
#--add-exports java.base/java.lang=ALL-UNNAMED
#--add-exports java.base/jdk.internal.misc=ALL-UNNAMED
COMMAND="java -cp $SHIP_CONF:$JARS \
-Dio.netty.tryReflectionSetAccessible=true \
-Dlogback.verbose=true \
-Dlogging.config=$SHIP_CONF/ship-logger.xml \
-Dlogback.configurationFile=$SHIP_CONF/ship-logger.xml ship.exec.ShipLauncher $@"
$COMMAND
Modify it to next
...
COMMAND="java -cp $SHIP_CONF:$JARS \
--add-exports java.base/java.lang=ALL-UNNAMED \
--add-exports java.base/jdk.internal.misc=ALL-UNNAMED \
-Dio.netty.tryReflectionSetAccessible=true \
-Dlogback.verbose=true \
-Dlogging.config=$SHIP_CONF/ship-logger.xml \
-Dlogback.configurationFile=$SHIP_CONF/ship-logger.xml ship.exec.ShipLauncher $@"
$COMMAND