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.
Asked
Active
Viewed 43 times
1 Answers
3
Process proc = Runtime.getRuntime().exec(...);
InputStream in = proc.getInputStream();
BufferedReader br = new BufferedReader(new InputStreamReader(in));
String txt = null;
while ((txt = br.readLine()) != null) {
//...
}

ControlAltDel
- 33,923
- 10
- 53
- 80
-
Thank you it worked. I was using the wrong buffer and stream! Much appreciated. Will accept the answer when I can :D – k3vy w3vy Jun 22 '15 at 21:08