>and it did not work if it have errors.
Try to execute javac.exe as a subprocess using Runtime.exec method and get error output of subprocess using Process.getErrorStream() method.
String []cmd={"javac.exe","Sample.java"};
Process proc=Runtime.getRuntime().exec(cmd);
java.io.InputStream in=proc.getErrorStream();
__avd
Posting Genius (adatapost)
8,648 posts since Oct 2008
Reputation Points: 2,136
Solved Threads: 1,241