Click the Start a free trial link to start a 15-day SaaS trial of our product and join our community as a trial user. If you are an existing customer do not start a free trial.
AppDynamics customers and established members should click the sign in button to authenticate.
I'm using macOS sierra , firstly i installed java(jdk 9.0.1) after that i installed the apache tomcat server and it worked successfully after that i followed the instructions in the video of installing java agent ; as i downloaded the agent and followed the steps but i can't attach the server to the agent due to the error (in the below screenshot):
i noticed that tools.jar not exist in the JDK lib folder , but i don't know why and is it the problem or what ?
how can i fix this issue , please ?
java 9 removed tools.jar from the distribution, and also removed the -Xbootclasspath option (see the modules spec)
You should find that the agent will attach to your running tomcat if you simply remove this option from the command line.
thanks peter for your support ,but i tried it but it failed also so could you tell me what needs to be modified in the command so that it can attached successfully ,the original command :
sudo java -Xbootclasspath/Library/Java/JavaVirtualMachines/jdk-9.0.1.jdk/Contents/Home/lib/classes.jar -jar /Users/amrgamal/Downloads/AppServerAgent-4/ver220.127.116.11/javaagent.jar
I just noticed from the path in your command that you are using version 18.104.22.168 of the agent.
JDK9 support was a new feature we introduced in the 4.4 release, so you will need to upgrade to a 4.4 agent and controller, or downgrade to jdk 8 to get this working.
Are you sure the java command hasn't picked up the java 9 JDK?
What happens if you replace "java" with "/Library/Java/JavaVirtualMachines/jdk1.8.0_151.jdk/Contents/Home/bin/java" ?
Ah, I just noticed that your bootclasspath option is slightly malformed
From the documentation, you want to run the command like this:
java -Xbootclasspath/a:<path_to_jdk>/lib/tools.jar -jar /<agent_home>/javaagent.jar <jvm_process_id>
you're missing the "/a:" part, and the process ID of your running tomcat. Can you try adding these?