wood burning stoves
The moose likes Beginning Java and the fly likes Runtime.getRuntime().exec( Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Runtime.getRuntime().exec("") on As400" Watch "Runtime.getRuntime().exec("") on As400" New topic

Runtime.getRuntime().exec("") on As400

kamesh aru
Ranch Hand

Joined: Mar 16, 2002
Posts: 150
while i am executing
ws_ant coomand at qshell its displaying fallowing message
Buildfile: build.xml does not exist!
Build failed
theProcess = Runtime.getRuntime().exec("ws_ant");
its giving error
Error on exec() method
java.io.IOException: ws_ant: not found
at java.lang.Throwable.<init>(Throwable.java:195)
at java.lang.Exception.<init>(Exception.java:41)
at java.io.IOException.<init>(IOException.java:40)
at com.ibm.as400.system.OS400Process.<init>(OS400Process.java:88)
at java.lang.Runtime.exec(Runtime.java:566)
at java.lang.Runtime.exec(Runtime.java:428)
at java.lang.Runtime.exec(Runtime.java:364)
at java.lang.Runtime.exec(Runtime.java:326)
at CallHelloPgm.main(CallHelloPgm.java:19)
at CallHelloPgm.main(CallHelloPgm.java:31)

can any one help out with the probelm
thanks in advance
Rick O'Shay
Ranch Hand

Joined: Sep 19, 2004
Posts: 531
My guess is it cannot find the script or qsh is not installed.
kamesh aru
Ranch Hand

Joined: Mar 16, 2002
Posts: 150
qsh is installed and ws_ant is present in the folder

Runtime.getRuntime().exec("java hello");
hello being another java class its executing perfectly from same qsh
jQuery in Action, 2nd edition
subject: Runtime.getRuntime().exec("") on As400