所有人都在通过我的应用程序编译和运行 java 源代码的项目。在这里卡住将在这里解释我的环境..
java 1.6.0_35 32bit
并
在我使用此代码时eclipse indigo
使用操作系统windows 64 bit
String command = "javac "+file.getAbsolutePath();
System.out.println(command);
Process p = Runtime.getRuntime().exec(command);`
得到这个异常..认为错误显示文件不存在,但我检查了它,它就在这里,当我通过编译的命令行执行时,但 eclipse 显示这个错误
java.io.IOException: Cannot run program "javac": CreateProcess error=2, The system cannot find the file specified
at java.lang.ProcessBuilder.start(Unknown Source)
at java.lang.Runtime.exec(Unknown Source)
at java.lang.Runtime.exec(Unknown Source)
at java.lang.Runtime.exec(Unknown Source)`
任何人都可以解决这个问题,我尝试了很多..