Loading

What is "JDK_JAVA_OPTIONS=--add-opens" In wrapper.conf Used For

Publiseringsdato: Jul 26, 2024
Beskrivelse

Warn message "WARNING: An illegal reflective access operation has occurred" is noted when starting Mule Runtime on JDK version >= 9.
 

CAUSE

JDK version 9 or later is modularized and introduced many changes. This modularization is making access to JDK internal class illegal.  More details can be found at JDK migration page.

 

PRODUCTS AFFECTED

Mule Runtime runs on JDK 9 or later

Løsning

The following JDK options were added into Mule Runtime's wrapper.conf file to suppress the WARNING log as temporary mitigation.

set.JDK_JAVA_OPTIONS=--add-opens java.base/sun.net.www.protocol.file=ALL-UNNAMED --add-opens java.base/java.lang.reflect=ALL-UNNAMED --add-opens java.base/java.lang=ALL-UNNAMED  --add-opens java.desktop/java.beans=ALL-UNNAMED

For later JDK 11 versions such as JDK-11.0.17, the WARNING message could suggest some different JAVA OPTIONS. In that scenario, please adjust the set.JDK_JAVA_OPTIONS setting in wrapper.conf to match the JAVA OPTIONS suggested in the WARNING message. For example, for JDK-11.0.17, the settings need to be adjusted to the following:

set.JDK_JAVA_OPTIONS=--add-modules java.se --add-exports java.base/jdk.internal.ref=ALL-UNNAMED --add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/java.nio=ALL-UNNAMED --add-opens java.base/sun.nio.ch=ALL-UNNAMED --add-opens java.management/sun.management=ALL-UNNAMED --add-opens jdk.management/com.sun.management.internal=ALL-UNNAMED

 


 

Knowledge-artikkelnummer

001119252

 
Laster
Salesforce Help | Article