User Tools

Site Tools


java_class_process

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
java_class_process [2013/04/29 08:30]
yann
java_class_process [2013/04/29 08:32]
yann
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."​ (from the [[http://​docs.oracle.com/​javase/​1.4.2/​docs/​api/​java/​lang/​Process.html|Javadocs of version 1.4.2]]). 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 [[http://​docs.oracle.com/​javase/​1.4.2/​docs/​api/​java/​lang/​Process.html|Javadocs of version 1.4.2]]).
  
-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:
  
 <​code>​ <​code>​
Line 25: Line 25:
 ===== The Bug ===== ===== The Bug =====
  
-When applying [[MoDeC]] on "​small" ​program, we did not encounter any problem, neither on Windows nor on Mac OS. However, when Soumaya ran [[MoDeC]] on the instrumented version of ArgoUML v0.19.8, ​should ​got this exception (here reproduced using Venera'​s Mac):+When applying [[MoDeC]] on "​small" ​programs, we did not encounter any problem, neither on Windows nor on MacOS. However, when Soumaya ran [[MoDeC]] on the instrumented version of ArgoUML v0.19.8, ​she got this exception (here reproduced using Venera'​s Mac):
  
 <​code>​ <​code>​
Line 38: Line 38:
 </​code>​ </​code>​
  
-which was very puzzling because the version of [[MoDeC]] and the same input file and the same instrumented bytecodes would work on Yann's Windows laptop and produce the expected traces.+which was very puzzlingbecause the //​same// ​version of [[MoDeC]] and the //same// input file and the //same// instrumented bytecodes would work on Yann's Windows laptop and produce the expected traces.
  
 ===== The Solution ===== ===== The Solution =====
java_class_process.txt ยท Last modified: 2019/10/06 20:37 (external edit)