• Post Reply Bookmark Topic Watch Topic
  • New Topic

Unable to execute this command in java-No error but no output  RSS feed

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HI All,
This is taking lot of time to get the solution.
Any hlep is appreciated.
I have executed some of the win command with java but this particular alone is not executing as expected.
It does not result any error but after execution the log Nightly was supposed to be created which did not happend thro java. Any idea?[When I execute thro win command prompt- it si working)

Runtime runtime1 = Runtime.getRuntime();
Process proc3 = runtime1.exec("cmd /C C:\\Program Files\\folder1\\folder2\\PsTestFw.exe -CS=xxx.us.ip.com:12001 -CO=XP1 -CP=XP1 -TST=SAMPLESELVA -TC=DEFAULT -EXO=Nightly -LOG=Nightly");
proc3.waitFor();

One more update - if I restrict the code till 'C:\\Program Files\\PeopleSoft\\PeopleSoft Test Framework\\PsTestFw.exe, it is invoking the exe', it is working. Hence I guess some issue with swiches passed. Any help?
 
Marshal
Posts: 56610
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch

How are you emptying the output and error streams from that process? Don’t go anywhere near processes until you have read about the java.lang.ProcessBulder class, and the classic Michael Daconta article, which you might find a link to here.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!