I'm aware of how to start a java progam with a java agent:
java -javaagent:myAgent.jar MyJavaProgram
But what if I want to add 2 or more java agents to instrument my program? I do not want to reinvoke the java -javaagent:... for every agent I have to load in JVM.
I've tried something like this :
java -javaagent:agentA.jar, agentB.jar MyJavaProgram
or something like this:
java -javaagent:agentA.jar agentB.jar MyJavaProgram
But have no success.
Is there an answer to solve my problem ?
Thank you.
How about two javaagent
parameters?
java -javaagent:agentA.jar -javaagent:agentB.jar MyJavaProgram