This week's giveaway is in the Spring forum.
We're giving away four copies of REST with Spring (video course) and have Eugen Paraschiv on-line!
See this thread for details.
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

Win a copy of REST with Spring (video course) this week in the Spring forum!
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.
I agree. Here's the link:
subject: external programs in java
jQuery in Action, 3rd edition