Knowledge Base: Apache Commons Daemon (jsvc) and the New Relic Java agent

The version of Apache Commons Daemon (jsvc) included with Tomcat 6 and available for download on the Apache Commons website does not support many Java 5 jvm switches including the javaagent switch required to start the New Relic java agent. Here is the jsvc bug tracking the issue:

http://issues.apache.org/jira/browse/DAEMON-84

There is a fix checked into the trunk of the Apache Commons source repository. This page has information on the Apache source repository:

http://commons.apache.org/svninfo.html

A build of the jsvc daemon from the trunk source will support the -javaagent switch. The New Relic -javaagent switch can be set as part of the CATALINA_OPTS in $CATALINA_HOME/bin/Tomcat5.sh.