• Post Reply Bookmark Topic Watch Topic
  • New Topic

Re-directing the output to a file  RSS feed

 
Selvaraj Premkumar
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I couldn't succeed to get the output of a java program(both at the time of compiling and executing) executed through Runtime.exec(). Can anybody help me in this?
Thanks in advance
Prem
 
Carl Trusiak
Sheriff
Posts: 3341
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Some thing similar was answered here http://www.javaranch.com/ubb/Forum38/HTML/000063.html
If you want to get the output from javac, you need to getErrStream instead of getInputStream on the process.
Hope this helps
 
Selvaraj Premkumar
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Carl,
Thanx for your reply. It worked for me now.
Rgds
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!