File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Runtime.getRuntime().exec("") on As400" Watch "Runtime.getRuntime().exec("") on As400" New topic
Author

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)
java.lang.NullPointerException
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
 
Don't get me started about those stupid light bulbs.
 
subject: Runtime.getRuntime().exec("") on As400
 
Similar Threads
how to open the excel file in java program?
Process
.sh file not found
Runtime.exec()
Executing Unix Command Through Java