New entries in JVMOptions.txt file for Policy Server 12.9 version.
search cancel

New entries in JVMOptions.txt file for Policy Server 12.9 version.

book

Article ID: 408453

calendar_today

Updated On:

Products

SITEMINDER

Issue/Introduction

Found below entries in JVMOptions.txt file that comes with SiteMinder Policy server version 12.9.

Please share documentation that explain about below values and also confirm whether these are mandatory. 
 

--add-opens=java.xml/com.sun.org.apache.xerces.internal.dom=ALL-UNNAMED
--add-opens=java.xml/com.sun.org.apache.xerces.internal.jaxp=ALL-UNNAMED
--add-opens=java.xml/com.sun.org.apache.xerces.internal.util=ALL-UNNAMED
--add-opens=java.base/sun.net.www.protocol.http=ALL-UNNAMED

Environment

Policy Server Version: 12.9
O/S: Any

Resolution

The --add-opens option in Java is used to open/access specific packages in a module at runtime. It's part of the Java Platform Module System (JPMS), introduced in Java 9, which enforces strong encapsulation of module internals by default.

Before Java 9, It was possible to use reflection to access private or internal fields and methods without restrictions. But starting with Java 9, modules were introduced, and many internal APIs became inaccessible via reflection unless explicitly opened.

For example  -- add-opens=java. xml/com.sun.org. apache.xerces.internal.dom=ALL-UNNAMED in JvmOptions.txt 

The -- add-opens=java. xml/com.sun.org. apache.xerces.internal.dom=ALL-UNNAMED is a JVM argument used in Java applications to grant access to internal JDK packages that are restricted due to Java's module system (introduced in Java 9). 

Specifically, this argument allows code in an unnamed module (e.g., non-modularized code) to access the com.sun.org.apache.xerces.internal.dom package in the java.xml module, which is part of the Xerces XML parser implementation used internally by the JDK.