Instrumenting a java program using the default java agent

Document ID : KB000094256
Last Modified Date : 03/05/2018
Show Technical Document Details
Issue:
I have an application which needs the default java agent as there is no application server. Tried to instrument using IntroscopeAgentFiles-NoInstaller10.5.2.52default.unix.tar. So wrote a wee program and wee script with the agent instrumentation and got no logs and no communication with the EM.

The script looks like below:
java HelloWorld -javaagent:/home/wily/wily/Agent.jar -DagentProfile=/home/wily/wily/core/config/IntroscopeAgent.profile


 
Environment:
Any agent version
Cause:
This is caused due to the java program (HelloWorld) not being defined after invoking -javaagent
Resolution:
Replace:

java HelloWorld -javaagent:/home/wily/wily/Agent.jar -DagentProfile=/home/wily/wily/core/config/IntroscopeAgent.profile

to

java -javaagent:/home/wily/wily/Agent.jar -DagentProfile=/home/wily/wily/core/config/IntroscopeAgent.profile HelloWorld