Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to get a value from process

 
rajashree loganayagi
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

i wrote a code for executing the batch file using socket program.

i need to get the content of the batch file which has to be sent as a request to the server.

but i cant able to get the content.

Here are my codes :


The problem is that while printing the "line" variable, i get no response in the console.
Can any one please help me....

Thanks in advance.
 
Rob Spoor
Sheriff
Pie
Posts: 20527
54
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moving to Java in General.

Also, read this. You either need to read from p.getErrorStream() as well, in a different thread, or use ProcessBuilder with redirectErrorStream(true) instead of Runtime.exec to create the Process.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic