k3vy w3vy
k3vy w3vy

Reputation: 131

accessing information within c# script in java

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.

Upvotes: 1

Views: 49

Answers (1)

ControlAltDel
ControlAltDel

Reputation: 35096

Process proc = Runtime.getRuntime().exec(...);
InputStream in = proc.getInputStream();
BufferedReader br = new BufferedReader(new InputStreamReader(in));
String txt = null;
while ((txt = br.readLine()) != null) {
  //...
}

Upvotes: 3

Related Questions