Skip to main content

Use the Java Agent with the Java Platform Module System (JPMS)

JPMS is a way to encapsulate code that is present in Java versions 9 and later. Contrast supports inspection of modules and launching of applications written with the JPMS.

The Java Agent requires that the java.sql package be required by the application's module-info.java files:

module mymodule {
    requires java.sql;
}

or supplied by the --add-modules command-line argument at runtime:

java -javaagent:/opt/contrast/contrast-agent.jar --add-modules java.sql --module-path libs --module mymodule/mycompany.App