Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

runtime.exec

Status
Not open for further replies.

Lars

Programmer
Aug 10, 2000
16
DE
Hello,

I am trying to start a program i.e OpenOffice on a Linux maschine using following code:


String PROG_NAME = "......"; // Path to the program
.
.
Runtime rt = Runtime.getRuntime();
Process proc = rt.exec(PROG_NAME);

The process is started, but I cannot see the output. On a Windows maschine everything works fine.
Can anybody help??

thanks
 
May be a little late, but anyway, remember taht exec is a blocking call, it may stall or deadlock your system, so always provide a PrintStream for it's output, that should take care of a lot of things on different platforms

Alex
 
Alex,

>> provide a PrintStream for it's output, that should take
>> care of a lot of things on different platforms

Could you elaborate?

-pete
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top