Instrumenting a java program using the default java agent

Document ID : KB000093127
Last Modified Date : 11/06/2018
Show Technical Document Details
Question:
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. Got no logs and no communication with the EM.
Environment:
Any agent version
Answer:
The script looks like:
java HelloWorld -javaagent:/home/wilyserv/wily/Agent.jar -DagentProfile=/home/wilyserv/wily/core/config/IntroscopeAgent.profile

The solution is to use the application at the end of the java arguments in the script as below:
java -javaagent:/export/home/wilyserv/wily/Agent.jar -DagentProfile=/export/home/wilyserv/wily/core/config/IntroscopeAgent.profile HelloWorld