Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Run Linux script with Runtime.exec

807605Jul 30 2007 — edited Aug 7 2007
Hi there!

I want to run some Linux script files out of a Java application.
I'm currently using a code like this:
Runtime rt = Runtime.getRuntime();
Process p=rt.exec("//home//scriptFile1");
But this isn't working. Although I'm getting no exeption, the file isn't executed.
It looks like he's doing something, but he's definitly not processing the file.

I think the problem is probably, that in scriptFile1, I call some other script files (which call itself some other script files).
E.g. like this:

scriptFile1:
scriptFile2
binary1
binary2
scriptFile3
Any ideas?

Thank you!
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 4 2007
Added on Jul 30 2007
17 comments
209 views