This is an old revision of the document!
Between 1.4.2 and the versions v1.6+ of the JDK, changes have been made to the creation of processes. These changes bring benefits, in particular in the light of a nasty bug found by Soumaya and Venera when running MoDeC on MacOS.
The Java class Process is used together with class Runtime. As explained by Oracle: “The Runtime.exec methods create a native process and return an instance of a subclass of Process that can be used to control the process and obtain information about it. The class Process provides methods for performing input from the process, performing output to the process, waiting for the process to complete, checking the exit status of the process, and destroying (killing) the process.” (from the Javadocs of version 1.4.2).
Typically, in MoDeC, we created and run a Process to execute a program whose bytecodes we had instrumented and collect traces, as follows:
final Process process = Runtime.getRuntime().exec( commandLine, new String, absolutePathToInstrumentedFiles);
This bug could not have been found without the dedicated MacOS users of the lab. Soumaya and Venera This bug could not have been fixed without Venera's great help and patience!