File tree 2 files changed +6
-1
lines changed
asciidoctorj-distribution/src/main/resources
2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -307,6 +307,7 @@ Improvements::
307
307
* Upgrade to Asciidoctor 2.0.8
308
308
* Upgrade to asciidoctor-pdf 1.5.0-alpha.17 (#809)
309
309
* Add Rouge source highlighter to asciidoctor.jar (#806)
310
+ * Add required `--add-opens` to cli launch script to remove Jdk warnings when running on Java8 (#1155) (@abelsromero)
310
311
311
312
Bug Fixes::
312
313
Original file line number Diff line number Diff line change @@ -29,6 +29,10 @@ APP_BASE_NAME=`basename "\$0"`
29
29
30
30
# Add default JVM options here. You can also use JAVA_OPTS and ${optsEnvironmentVar} to pass JVM options to this script.
31
31
DEFAULT_JVM_OPTS=${defaultJvmOpts}
32
+ readonly java_version=\$ (java -version 2>&1 | sed -n ' ;s/.* version "\\(.*\\)\\.\\(.*\\)\\..*".*/\\1\\.\\2/p;' )
33
+ if [ " \$ java_version" != " 1.8" ]; then
34
+ DEFAULT_JVM_OPTS=" --add-opens java.base/sun.nio.ch=ALL-UNNAMED --add-opens java.base/java.io=ALL-UNNAMED \$ DEFAULT_JVM_OPTS"
35
+ fi
32
36
33
37
# Use the maximum available, or set MAX_FD != -1 to use that value.
34
38
MAX_FD=" maximum"
@@ -164,4 +168,4 @@ APP_ARGS=\$(save "\$@")
164
168
# Collect all arguments for the java command, following the shell quoting and substitution rules
165
169
eval set -- \$ DEFAULT_JVM_OPTS \$ JAVA_OPTS \$ ${optsEnvironmentVar} < % if ( appNameSystemProperty ) { %> " \" -D${appNameSystemProperty} =\$ APP_BASE_NAME\" " < % } %> -classpath " \"\$ CLASSPATH\" " ${mainClassName} " \$ APP_ARGS"
166
170
167
- exec " \$ JAVACMD" " \$ @"
171
+ exec " \$ JAVACMD" " \$ @"
You can’t perform that action at this time.
0 commit comments