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!

invoking a bash shell script from Java code

807589Mar 27 2008 — edited Sep 14 2008
Hi All

I am trying to invoke a Bash shell script using java code. The arguments required are "source wmGenPatch <source dir> <destination dir> no_reverse.

in the code I have specified the arguments considering the cannonical paths of the files as the code may run on Unix or windows platform.

I am getting a error while invoking Runtime.getRuntime().exec(args). The error is as follows :
"The Error Occurred is: CreateProcess: source D:\Package4.0\workspace\DiffEngineScripts\v4a02\wmGenPatch D:\Package4.0\workspace\fromImageFilesDir\ D:\Package4.0\workspace\toImageFilesDir\ no_reverse error=2"

It seems that error=2 indicates that the 'file not found' exception. But i can see the directories referred to in the error at place in the workspace.

Kindly advice.

Thanks in advance.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 12 2008
Added on Mar 27 2008
15 comments
763 views