Step 1: Add VM option '-agentpath'

Add -agentpath:<full agent library path> VM option to the command line of Java application to be profiled.

The agent library path depends on your OS:

 

Windows, 32-bit Java

-agentpath:<profiler directory>\bin\win32\yjpagent.dll

Windows, 64-bit Java

-agentpath:<profiler directory>\bin\win64\yjpagent.dll

Mac OS X

-agentpath:<profiler directory>/bin/mac/libyjpagent.jnilib

Linux x86, 32-bit Java

-agentpath:<profiler directory>/bin/linux-x86-32/libyjpagent.so

Linux x86, 64-bit Java

-agentpath:<profiler directory>/bin/linux-x86-64/libyjpagent.so

Solaris SPARC, 32-bit Java

-agentpath:<profiler directory>/bin/solaris-sparc-32/libyjpagent.so

Solaris SPARC, 64-bit Java

-agentpath:<profiler directory>/bin/solaris-sparc-64/libyjpagent.so

Solaris x86, 32-bit Java

-agentpath:<profiler directory>/bin/solaris-x86-32/libyjpagent.so

Solaris x86, 64-bit Java

-agentpath:<profiler directory>/bin/solaris-x86-64/libyjpagent.so

HP-UX IA64, 32-bit Java

-agentpath:<profiler directory>/bin/hpux-ia64-32/libyjpagent.so

HP-UX IA64, 64-bit Java

-agentpath:<profiler directory>/bin/hpux-ia64-64/libyjpagent.so

 

If you have copied the profiler agent library file from the profiler installation directory to another location, please change the path accordingly.

You can find examples of startup scripts for your platform in <profiler directory>/samples

To check that Java can load the profiler agent, invoke the following command that prints a description of agent parameters: