title: How to generate jacoco.exec file on a remote server
body: <p>I am running a tomcat server and in it's <code>catalina.sh</code> I have exported <code>JAVA_OPTS</code> as follows.</p>
  
  <p><code>JAVA_OPTS="$JAVA_OPTS -javaagent:/opt/jacoco/lib/jacocoagent.jar=destfile=/tmp/jacoco.exec,append=true,includes=*"</code></p>
  
  <p>This generates the jacoco.exec file in the same machine in <code>/tmp</code> folder. How do I generate the exec file on a remote machine for instance a machine that is a jenkins slave so that I can get the coverage via sonar.</p>