title: How to attach JaCoCo Agent to application server
body: <p>I am using JBoss and running Selenium tests from Jenkins. I want to measure code coverage from Selenium tests, so apparently I should attach the JaCoCo java agent to the server. I have done like this:</p>
  
  <pre><code>./run.sh -c Default -Djavaagent:[path to Jenkins workspace]/tools/libs/jacocoagent.jar=destfile=[path to Jenkins]/jacoco.exec
  </code></pre>
  
  <p>However, no output file is ever generated. I am here pointing to jacocoagent.jar in the Jenkins path, but is it so that the jacocoagent.jar and jacoco.exec must be in the actual server path, not Jenkins? </p>