I have an external program (packaged in a jar) that I want to execute from another Java program, which I do using
Process proc = Runtime.getRuntime().exec(command)
This jar program now returns a sentence as output, which I want to use later on in the program, so I want to convert its output, for which I use the suggestion on using IOUtils I found here.
However
InputStream in = proc.getInputStream();
String myString = IOUtils.toString(in, "UTF-8");
only return the first word of the sentence. Is it possible to get the full sentence out of the inputstream?