事例如下:
public class Demo{
public static void main(String [] args) throws IOException, InterruptedException{
String[] command = {"javac ","SuffixFilter.java"};
File f = new File("C:\\Documents and Settings\\Administrator\\桌面\\src");
Runtime r = Runtime.getRuntime();
try {
r.exec(command,null,f);
} catch (IOException e1)
{
}
}
}
————————————————
版权声明:本文为CSDN博主「明明如月学长」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/w605283073/article/details/46572475