[java] Fixed EOF catching on the output of sys.io.Process
Merge pull request #2589 from jonasmalacofilho/development

[java] Fixed EOF catching on the output of sys.io.Process