I have installed YourKit Java Profiler (version: 2019.8-b138) on my Windows 7 machine (64-bit OS). My goal is to profile a Java Web application hosted in Tomcat 7, where the Tomcat is installed on a Windows Server 2008 R2 Enterprise (64-bit OS) as a Windows Service. I tried performing the following configurations:
1. Copied the yjpagent.dll from \bin\win64\ of the YourKit installed on my machine. (Also I copied the attach.dll just in case.)
2. Logged into the remote server and pasted the files in the drive where the Tomcat resides.
3. Catalina.bat is not available so I launched Tomcat7w.exe and clicked on the 'Java' tab to see the Java Options.
4. Added the following line in the Java Options
-agentpath:C:\yjpagent.dll=listen=all
5. Problem: upon restarting the Tomcat Service the Service doesn't start again.
6. Coming back to my machine, I launch the YourKit Profiler application and click on 'Profile remote Java EE server or application...'
7. Type in the Host name. Application discovery method is set to 'Simple'. Rest everything is default. I click on OK.
8. Since I failed to restart the Tomcat Service, I remove the agentpath option from Tomcat7w. Tomcat Service restarts now without any problem.
9. I come back to my machine, still YourKit fails to detect any application on the remote server.
What am I doing wrong? Please suggest.