-XX:[+|-]EnableDynamicAgentLoading

This option enables or disables the dynamic loading of agents into a running VM.

Syntax

    -XX:[+|-]EnableDynamicAgentLoading
Setting Effect Default
-XX:+EnableDynamicAgentLoading Enable yes
-XX:-EnableDynamicAgentLoading Disable

Explanation

With the Attach API, your application can connect to a running VM and load an agent dynamically into that VM to run tasks. Some libraries misuse the Attach API to dynamically load an agent to run tasks without the approval of the application owner.

You can disable the dynamic loading of the agents into a VM after startup with the -XX:-EnableDynamicAgentLoading option.

See also