aspose file tools*
The moose likes Java in General and the fly likes Error in executing a while loop Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Error in executing a while loop" Watch "Error in executing a while loop" New topic
Author

Error in executing a while loop

rajashree loganayagi
Greenhorn

Joined: Apr 12, 2011
Posts: 20
Hi,

I wrote a socket program, which needs to run a shell program in the client-side for every 10secs. The output of the shell program has to be sent to the server.

The problem is in the client-side, where i need to run the shell continuously whithout any break.

For this i used while loop which is set to true. But i cant run the shell program continuously. i noticed that the client side runs for upto 6 or 7times and remains silent.

Here the the following codes:


This code works fine with smaller amount of input. But for larger case it doesn't works.

Can anyone help me....


Thanks in advance.
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19720
    
  20

When Runtime.exec() won't. Read it, not reading from p1.getErrorStream() is the likely cause of your problem.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Error in executing a while loop