java_class_process
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| java_class_process [2013/04/29 08:01] – yann | java_class_process [2025/01/15 21:40] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 5: | Line 5: | ||
| 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." | 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." | ||
| - | Typically, in [[MoDeC]], we created and run a Process that executes a new Java virtual machine, which itself runs a program whose bytecodes we had instrumented to collect traces. Simply put: | + | Typically, in [[MoDeC]], we created and ran a Process that executes a new Java virtual machine, which itself runs a program whose bytecodes we had instrumented to collect traces. Simply put: |
| < | < | ||
| - | String commandLine = ...; | + | final String commandLine = ...; |
| - | String | + | final File absolutePathToInstrumentedFiles = ...; |
| final Process process = | final Process process = | ||
| Line 21: | Line 21: | ||
| * commandLine is the complete command line to run a new Java virtual machine; | * commandLine is the complete command line to run a new Java virtual machine; | ||
| * new string[0] tells the Runime.exec() that we do not touch the environment; | * new string[0] tells the Runime.exec() that we do not touch the environment; | ||
| - | * absolutePathToInstrumentedFiles is the complete, absolute path to the root directory containing the instrumented bytecodes. | + | * absolutePathToInstrumentedFiles is a File pointing on the root directory containing the instrumented bytecodes. |
| - | ===== The Bug ===== | + | ====== The Bug ====== |
| + | When applying [[MoDeC]] on " | ||
| - | ===== The Solution ===== | + | < |
| + | Exception in thread " | ||
