Usage:
The JVM parameter “agentpath” loads a native agent library specified by the absolute path name.
Since:
Starting from JDK 1.5
Syntax:
java -agentpath:<path>[=options]
Examples:
An example to run Java Debug Wire Protocol (JDWP) which is mainly for debugging your Java project:
java -agentpath:/path/libname.so[=options] MainClass
Description:
agentpath is a parameter that allows you to load any native library that uses the Java Virtual Machine Tool Interface (JVM TI) using its full path. After the parameter “-agentpath:”, you will need to specify the full path of the native library to be used. After the path, you can add an equal sign and pass options to the agent, separated by commas, if needed. Specify the full path name of either the 32-bit JVMTI agent or the 64-bit JVMTI agent depending on whether your target Java job is 32-bit or 64-bit.
Default Value:
The default is an empty library.
Errors:
The library should exist and the JVM needs to have the permission to access to the path.
Arguments related:
agentlib
Related Posts:
Note:
“agentpath” is equivalent to “agentlib” where you only specify the platform-specific library name, but then you have to make sure that the library is contained in the library path.
Edit your Comment