Process process2 = Runtime.getRuntime().exec(new String[]{"javac","-g:vars","/Users/amol/Documents/Java/a.java"});
Process process3 = Runtime.getRuntime().exec(new String[]{"javap","-l","-c","/Users/amol/Documents/Java/a"});
我试图运行这段代码,但我遇到了一个奇怪的问题。它编译正确(意味着第一行编译了程序),但第二行给出了一个错误,说'a' not found
. 但是,当我检查给定的目录a.class
文件是否正确创建时。我应该如何正确运行第二行?