Profile Image
vishnupriya

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

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.

Got something else on mind? Post Your Question

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

  • agentpath

  • JVM startup parameter