Is there any way to configure javaagent in catalina.sh..?

121 views
Skip to first unread message

alexrev...@gmail.com

unread,
Sep 20, 2018, 3:31:39 AM9/20/18
to JaCoCo and EclEmma Users
Is there any way to configure javaagent in catalina.sh whilte the tomcat is running...?

Evgeny Mandrikov

unread,
Sep 20, 2018, 7:21:54 AM9/20/18
to JaCoCo and EclEmma Users

On Thursday, September 20, 2018 at 9:31:39 AM UTC+2, alexrev...@gmail.com wrote:
Is there any way to configure javaagent in catalina.sh whilte the tomcat is running...?

You can configure agent in catalina.sh , but as was correctly already replied to one of your previous messages ( https://groups.google.com/d/msg/jacoco/RWV1Ky5yKzA/zfOtCpa4CQAJ ):

"The agent starts together with the vm"

In other words - there is no way to start agent without (re)starting tomcat.

alexrev...@gmail.com

unread,
Sep 20, 2018, 8:22:02 AM9/20/18
to JaCoCo and EclEmma Users
yes i am already done it but i need to add agent when ever i need the coverage because i doesn't need the coverage all the time ....
Ok i can restart the tomcat after adding agent but is there any way to add agent by using ant file or java program,...?

Evgeny Mandrikov

unread,
Sep 20, 2018, 11:08:58 AM9/20/18
to JaCoCo and EclEmma Users


On Thursday, September 20, 2018 at 2:22:02 PM UTC+2, alexrev...@gmail.com wrote:
yes i am already done it but i need to add agent when ever i need the coverage because i doesn't need the coverage all the time ....
    Ok i can restart the tomcat after adding agent but is there any way to add agent by using ant file or java program,...?


there is documentation.

It describes everything what is available out-of-the-box, no more, no less.
So could you please finally make an effort to read it?
In particular it describes available Ant Tasks - https://www.jacoco.org/jacoco/trunk/doc/ant.html
And documentation does not describe anything specific to "catalina.sh", because in JaCoCo there is simply nothing out-of-the dedicated explicitly to it.

Also by reading Tomcat documentation ( https://tomcat.apache.org/tomcat-8.0-doc/RUNNING.txt ) you will find that additional Java options such as "-javaagent" (exactly like other Java options such as "-Xmx") can be specified via environment variable CATALINA_OPTS

Last but not least - before asking next question, please first spend more time than you do now on research by your own.


Regards,
Evgeny

Reply all
Reply to author
Forward
This conversation is locked
You cannot reply and perform actions on locked conversations.
0 new messages