• Post Reply Bookmark Topic Watch Topic
  • New Topic

problem running command from java  RSS feed

 
sahana mithra
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator



The code gives success but no output is produced in widows 7 proffessional. if i give C:\\Program Files\\....b.xml the program runs but hangs in the mid way
Solution please....
Thanks
 
Mohamed Sanaulla
Bartender
Posts: 3185
34
Google App Engine Java Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You need to be actually capturing the process's outputstream/errorstream to actually get the output from the command. Please read this article to know more about Runtime.exec().

Alternatively you can try using the Exec API from the Apache commons.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!