Class PluginLoader
java.lang.Object
org.owasp.dependencycheck.PluginLoader
Java agent for loading plugin JARs from a specified directory into the system classpath
before the main application starts. This allows additional plugins to be available at runtime
by appending their JAR files to the system class loader search path; while allowing use of an
executable jar with deterministic classpath ordering.
To use, specify this class as a Java agent and provide the plugins directory as the -javaagent argument
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidpremain(String agentArg, Instrumentation inst) Java agent entry point.
-
Constructor Details
-
PluginLoader
public PluginLoader()
-
-
Method Details
-
premain
Java agent entry point. Loads all JAR files from the specified plugins directory and appends them to the system class loader search path.- Parameters:
agentArg- the path to the plugins directory containing JAR files to load, e.g `-javaagent:cli.jar=/usr/share/dependency-check/plugins`inst- the instrumentation instance provided by the JVM
-