I am trying to start the javaagent.jar for appdynamics. I went to the specific version of appdynamics folder and tried " java -jar javaagent.jar <pid>"
But it says
java.lang.ClassNotFoundException: com.sun.tools.attach.VirtualMachine
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:188)
at com.singularity.ee.agent.appagent.AgentEntryPoint.main(AgentEntryPoint.java:458)
I have Java 7 in my machine. I am trying to start this in Windows 7 machine.
Another thing will the pid change frequently because i have found it is being changed over a period of time.
This is stopping me to start the monitoring can someone help me out on this issue and let me know how to resolve this issue.
The Java agent is added to the command line of another Java program. In other words you take an existing Java application command line and add a few more switches (one of them being -javaagent). e.g. java -jar myapplication.jar -javaagent javaagent.jar
The Java machine agent, on the other hand, is a separate program that runs on its own Java command line (not with any other application). So the Java machine agent is executed with its own java -jar machineagent.jar command line.
Hi ,
Are you facing the issue still, please be sure to start java agent as below as earlier stated by peter:
java -javaagent:/mnt/agent1/javaagent.jar -jar myapplication.jar
-javaagent is jvm arg that need to passed part of jvm startup script, keep us posted if you still facing the issue
Hi,
We request you to add -javaagent as part of web app server startup settings as stated in doc link https://docs.appdynamics.com/display/PRO40/Java+Supported+Environments#JavaSupportedEnvironments-App... example catalina.sh/bat file for tomcat to monitor server
If you want to monitor standalone jvm server instance, try
java -javaagent:<agent_dir>/javaagent.jar -jar myapp.jar
where agent-dir is appserveragent.zip exploded folder directory and myapp.jar is the customer jar , hope that information ehlps