java添加服务器地址,将-javaagent添加到Tomcat 6服务器,我在哪里放置它以什么格式?...

I´m trying to install an application health monitoring application that can monitor J2EE web transactions and I need to put a javaagent into my Tomcat somehow but am not clear on exactly how to do this, I am using Linux and have been instructed by the software company that makes this product to do something like below:

-javaagent:

I have received further support from them and they basically said to put this into the appropriate .sh file (but they weren´t able to tell me which file that is for Tomcat)

I tried putting this in the catalina.sh file but it does not seem to be working:

JAVA_OPTS=%JAVA_OPTS% -Xms128m -Xmx512m -XX:MaxPermSize=256m -javaagent:"C:\WebTransactionAgent.jar"

Any advice is appreciated

解决方案

For Unix/Linux, do this in /bin/setenv.sh, e.g.

CATALINA_OPTS="$CATALINA_OPTS -javaagent:/path/to/YourJar.jar"

You might need to create this file if not present and chmod it to 711 or 755.

For Windows, the counterpart is setenv.bat.

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值