Add – javaagent to Tomcat 6 server, where can I put it and what format?
•
Java
I'm trying to install an application health monitoring application that can monitor J2EE Web transactions. I need to put javaagent in my tomcat, but I don't know how to do this. I use Linux and the software instructs the company to make the product do as follows:
-javaagent:<Path to the WebTransactionAgent.jar>
I've got their further support. They basically put it in the right place SH file (but they can't tell me which Tomcat file is)
I tried to put it in Catalina SH file, but it doesn't seem to work:
JAVA_OPTS=%JAVA_OPTS% -Xms128m -Xmx512m -XX:MaxPermSize=256m -javaagent:"C:\WebTransactionAgent.jar"
Any suggestion is appreciated
Solution
For UNIX / Linux, see < Tomcat_ home> /bin/setenv. Sh
CATALINA_OPTS="$CATALINA_OPTS -javaagent:/path/to/YourJar.jar"
If it does not exist, you may need to create this file and change it to 711 or 755
For windows, the corresponding is setenv bat.
The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
二维码