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!

How to execute system command from java program

807569Sep 21 2006 — edited Sep 21 2006
Hi all,

I want to change directory path and then execute bash and other unix commands from a java program. When I execute them separately, it's working. Even in different try-catch block it's working but when I try to incorporate both of them in same try-catch block, I am not able to execute the commands. The change directory command works but it won't show me the effects of the bash and other commands.

Suggestions??
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 19 2006
Added on Sep 21 2006
15 comments
1,762 views