Does anyone know how to run an executable (say a c++ program) from
java and return, say a string back to the java file??
I have this code that can run an executable (in this case, it runs
NOTEPAD), but i wanted to know how i would be able to return
something:
import java.lang.System;
import java.lang.Runtime;
import java.io.IOException;
public class loadNotepad {
public static void main(String args[]) throws IOException {
Runtime r = Runtime.getRuntime();
Process p = null;
try {
p = r.exec("C:\\windows\\notepad.exe");
}
catch (Exception e) { }
}
}