-
Enhancement
-
Resolution: Delivered
-
P4
-
None
JDK 23 introduced a configuration template to help developers validate that their applications are prepared for future JDK releases which will be more restrictive by default. It would be good if we could update the guide to encourage developers to test their applications with the template.
Add a section in the "Configuring with JAXP Properties" section, after “Default JAXP Configuration File”:
JAXP Configuration Template with Strict Settings
The JDK provides a JAXP configuration template <java_home>/conf/jaxp-strict.properties.template to help developers validate that their applications are prepared for future JDK releases which will be more restrictive by default. This template contains settings that are more restrictive, reflecting those that are planned for the future releases. To test the readiness of an application and identify issues such as a processor unknowingly making outbound network connections to fetch DTDs or processing XML that relies on extension functions, copy the template to a new file with the `.properties` extension and use the system property `java.xml.config.file` to override the default configuration. For example:
cp <java_home>/conf/jaxp-strict.properties.template /path/to/jaxp-strict.properties
java -Djava.xml.config.file=/path/to/jaxp-strict.properties myApp
Refer to the java.xml module description for more details about <a href="https://docs.oracle.com/en/java/javase/22/docs/api/java.xml/module-summary.html#Conf">JAXP Configuration File</a>.
Add a section in the "Configuring with JAXP Properties" section, after “Default JAXP Configuration File”:
JAXP Configuration Template with Strict Settings
The JDK provides a JAXP configuration template <java_home>/conf/jaxp-strict.properties.template to help developers validate that their applications are prepared for future JDK releases which will be more restrictive by default. This template contains settings that are more restrictive, reflecting those that are planned for the future releases. To test the readiness of an application and identify issues such as a processor unknowingly making outbound network connections to fetch DTDs or processing XML that relies on extension functions, copy the template to a new file with the `.properties` extension and use the system property `java.xml.config.file` to override the default configuration. For example:
cp <java_home>/conf/jaxp-strict.properties.template /path/to/jaxp-strict.properties
java -Djava.xml.config.file=/path/to/jaxp-strict.properties myApp
Refer to the java.xml module description for more details about <a href="https://docs.oracle.com/en/java/javase/22/docs/api/java.xml/module-summary.html#Conf">JAXP Configuration File</a>.