Profile Image

What is JVM startup parameter: agentpath?

What is JVM startup parameter: agentpath? Have you used this JVM arguement before? What are the pros & cons of using this Java argument? Can you share your perspective/experience in using this JVM argument?

  • jvmargument

  • agentpath

  • JVM startup parameter

Please Sign In or to post your comment or answer

Profile Image

Pavel Khodakovsky



The JVM parameter “agentpath” loads a native agent library specified by the absolute path name.




Starting from JDK 1.5




java -agentpath:<path>[=options]




An example to run Java Debug Wire Protocol (JDWP) which is mainly for debugging your Java project:


java -agentpath:/path/[=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.


Default Value:


The default is an empty library.




The library should exist and the JVM needs to have the permission to access to the path.


Arguments related:




Related Posts:



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.

Got something else on mind? Post Your Question

Not the answer you're looking for? Browse other questions tagged
  • jvmargument

  • agentpath

  • JVM startup parameter