title: Log line numbers of executed java code
body: <p>I am writing part of a PHP web application (which will be used in a high school bug finding contest) where the user must find bugs in a given Java program.  As a part of this, when the Java program executes, we want to highlight the lines of the source of the Java program where the code has executed.  To do this, all we need are the line numbers of the source that have been executed, that is, the code path (or is it called code coverage?).  We will highlight the lines in the source file using the line numbers.</p>
  
  <p>We will be using PHP's shell-exec() to execute the Java program and the tool to get the code path (whatever that will be).  What is the easiest way of getting the line numbers of code path?</p>
  
  <p>Thank you very much!</p>
  
  <p>Here is a picture that describes what we would like</p>
  
  <p><img src="https://i.stack.imgur.com/GzBoU.png" alt="enter image description here"></p>