if ("Show".equals (obj))
{
try {
String command= "/usr/bin/xterm -e javac panel_1.java";
Runtime rt = Runtime.getRuntime();
Process pr = rt.exec(command);
BufferedReader in = new BufferedReader(new InputStreamReader(pr.getInputStream()));
String line = null;
while ((line = in.readLine()) != null) {
System.out.println(line);
}
} catch (IOException e) {
e.printStackTrace();
}
}
This opens the xterm window, calls javac on the panel panel_1.java, it compiles if the panel_1.java file is valid. then the xterm window closes. Great, I want to accept warnings, etc. From compilation and put them in a list or text. Any ideas ???
source
share