Runtime.getRuntime().exec的问题
wswhp 2009-03-23 11:38:39 我现在在程序里要调用 javac功能生成class文件 但现在不成功
我是这么写的
Process proc;
try {
String command = javac -nowarn "d:/src/stubs/AWSMReviewerStub.java" -d "D:/workspace/GenericFactory/classes/" -sourcepath "d:"
String[] env = {
"CLASSPATH=" + System.getProperty("java.class.path")
+ File.pathSeparatorChar + compiledStubPath
+ File.pathSeparatorChar + this.getJarPath(),
"SYSTEMROOT=" + System.getenv("SystemRoot") };
System.out.println("env == " + env);
proc = Runtime.getRuntime().exec(command, env);
} catch (Exception e) {
}
运行后 没有生成class文件,但是也看不到错误发生在哪
应该怎么看错误代码啊