The JVM parameter “agentpath” loads a native agent library specified by the absolute path name.
Starting from JDK 1.5
An example to run Java Debug Wire Protocol (JDWP) which is mainly for debugging your Java project:
java -agentpath:/path/libname.so[=options] MainClass
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.
The default is an empty library.
The library should exist and the JVM needs to have the permission to access to the path.
“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