|
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?
SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6 - OCEJPAD 6
How To Ask Questions How To Answer Questions
SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6 - OCEJPAD 6
How To Ask Questions How To Answer Questions
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:
SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6 - OCEJPAD 6
How To Ask Questions How To Answer Questions
SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6 - OCEJPAD 6
How To Ask Questions How To Answer Questions
prem pillai wrote:Just close the outputstream of the process. This will work
Regards
Prem
Politics n. Poly "many" + ticks "blood sucking insects". Tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
|