File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Java in General and the fly likes external programs in java Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "external programs in java" Watch "external programs in java" New topic

external programs in java

conor murphy

Joined: May 06, 2006
Posts: 15

i have created a program that uses the runtime.exec()method to run an external program. my problem is that when i run the program, it does nothing until i press cntrl-c to break it and then it prints out the output from the external program. is there a way to run the external program while my program is running without having to wait until my program ends? do i need to use threads?

James Sabre
Ranch Hand

Joined: Sep 07, 2004
Posts: 781

Yes you need thread(s). Check out

Retired horse trader.
 Note: double-underline links may be advertisements automatically added by this site and are probably not endorsed by me.
It is sorta covered in the JavaRanch Style Guide.
subject: external programs in java
jQuery in Action, 3rd edition