Ensure that the JVMTM software can find libdbx_agent.so by adding libdbx_agent.so to your LD_LIBRARY_PATH. libdbx_agent.so:
If you are using the 32-bit version of the JVM software on a system running the Solaris OS, add /installation_directory/libdbx_agent.so to LD_LIBRARY_PATH.
If you are using the 64-bit version of the JVM software on a SPARC based system running the Solaris OS, add /installation_directory/lib/v9/libdbx_agent.so to LD_LIBRARY_PATH.
If you are using the 64-bit version of the JVM software on an x64 based system running the Solaris OS or the Linux OS, add /installation_directory/lib/amd64/libdbx_agent.so to LD_LIBRARY_PATH.
The installation_directory is the location where the Sun Studio software is installed.
Start your Java application by typing:
java -Djava.compiler=NONE -Xdebug -Xnoagent -Xrundbx_agent myclass.class
Then you can attach to the process by starting dbx with the process id:
dbx -process_id