Java System Properties
Quick Reference Guide


jdk.xml.enableExtensionFunctions Java System Property

The jdk.xml.enableExtensionFunctions Java System Property accepts a boolean value (true or false)

Default Value

true

jdk.xml.enableExtensionFunctions Explained

determines whether XSLT and XPath extension functions are allowed

When the jdk.xml.enableExtensionFunctions property is true, XPath extension functions are allowed. When jdk.xml.enableExtensionFunctions is false XPath extension functions are disallowed.

Related System Properties

Here are some other XML java system properties:

References

Set Via jaxp.properties

The jdk.xml.enableExtensionFunctions can be specified in the jaxp.properties file, typically located in jvm's conf/jaxp.properties of your JVM. You can also create your own jaxp.properties file which can be set via the java.xml.config.file java system property.

Supported Since

Java has supported the jdk.xml.enableExtensionFunctions system property since version 7u60.

Setting jdk.xml.enableExtensionFunctions on Startup

You can set the jdk.xml.enableExtensionFunctions java system property during startup of the java runtime using the -D command line argument:

java -Djdk.xml.enableExtensionFunctions=false MyAppMain

You may also be able to specify jdk.xml.enableExtensionFunctions via the JAVA_TOOL_OPTIONS environment variable:

JAVA_TOOL_OPTIONS=-Djdk.xml.enableExtensionFunctions=false

Setting / Reading jdk.xml.enableExtensionFunctions at Runtime

You can set jdk.xml.enableExtensionFunctions at runtime with the following Java code:

System.setProperty("jdk.xml.enableExtensionFunctions", "false");

WARNING: Depending on the property and JVM version using setProperty may or may not work if the JDK Java class that uses this variable has already been loaded. The value of the jdk.xml.enableExtensionFunctions system property may be cached within an internal private static variable of the implementing class.

To read the value of jdk.xml.enableExtensionFunctions at runtime, you can use this Java code:

String propertyValue = System.getProperty("jdk.xml.enableExtensionFunctions");
if (propertyValue != null) {
    System.out.println("jdk.xml.enableExtensionFunctions = " + propertyValue);
} else {
    System.out.println("jdk.xml.enableExtensionFunctions was null");
}