How to set -javaagent JVM argument for profilers and agents in JBoss EAP 6
Issue
-
I'm trying to use the SizeOf project from sourceforge (http://sourceforge.net/projects/sizeof/), which requires setting -javaagent:/path/to/SizeOf.jar. I was able to get it working with a run configuration in Eclipse, but can't seem to get it working with EAP6. I tried passing it both on the command line and in standalone.conf and, even though the -javaagent argument is printed as a JAVA_OPTS at server startup, the instrumentation variable is always null, and I don't see the startup system.out.println that the SizeOf class prints when it's instantiated (JAVAGENT: call premain instrumentation for class SizeOf) in the server logs. Is there a way to do this?
-
The Java agent JAR is dependent on couple of JARs which are set in the agent JAR's
MANIFEST.MFvariableClass-Path: lib/jar1.jar lib/jar2.jar. Even though these JARs are available inlibdirectory at the root of the agent JAR, Why we are still encounteringNoClassDefFoundError.
Environment
- JBoss Enterprise Application Platform (EAP)
- 6.x
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.