Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
kamesh aru
Ranch Hand
Posts: 150
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 531
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My guess is it cannot find the script or qsh is not installed.
 
kamesh aru
Ranch Hand
Posts: 150
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic