I created a new exe with a C# script which I then execute inside of a Java program. The exe will pull a string from a process that is running and print it to the screen. I was wondering how to access that string in the exe through Java, if there is a way.
1 Answer
Process proc = Runtime.getRuntime().exec(...);
InputStream in = proc.getInputStream();
BufferedReader br = new BufferedReader(new InputStreamReader(in));
String txt = null;
while ((txt = br.readLine()) != null) {
//...
}
1 Comment
k3vy w3vy
Thank you it worked. I was using the wrong buffer and stream! Much appreciated. Will accept the answer when I can :D