Ernest Friedman-Hill wrote:The command line seems to indicate a different path to the file than the Java code is using. Are you showing us your real code, or am I just wasting my time pointing this out?
Rob Spoor wrote:Please UseCodeTags next time. I've added them now.
Maybe the application is writing data to its error stream as well, and gets blocked because the error stream buffer is full. That's why I suggested using ProcessBuilder with redirecting the stream.
Also, your loop looks odd. Both System.out and the file will get a trailing null. You can solve that by changing the loop to this:
prem pillai wrote:Just close the outputstream of the process. This will work