|
Java™ by example!
|
|
|
How do I execute an external batch file?
Start the process using the Runtime class. Using the methods getInputStream and getOutputStream, you can manipulate the input- and outputstreams of the batch file. Here's an example:
run.bat:
Problem: returning an exitcode from a batch file to the calling Java app doesn't seem to work. anyone?
Further Information
Author of answer: Joris Van den Bogaert
Comments
Comments to this answer are only viewable by members. Login or become a member!
|
|
|
|
|