我在 NetBeans7.2 中有一个简单的 Java 项目,当我尝试清理/构建时它失败了:
Building jar: D:\MEUS PROJETOS\_Workspace\JavaWorkspace\Mina\dist\Mina.jar
To run this application from the command line without Ant, try:
java -jar "D:\MEUS PROJETOS\_Workspace\JavaWorkspace\Mina\dist\Mina.jar"
Realizando o ofuscamento do código
Obfuscating dist/Mina.jar...
Created dir: D:\MEUS PROJETOS\_Workspace\JavaWorkspace\Mina\build\obfuscated
ProGuard, version 4.8
Reading program jar [D:\MEUS PROJETOS\_Workspace\JavaWorkspace\Mina\dist\Mina.jar]
Reading library jar [C:\Program Files\Java\jdk1.7.0\jre\lib\ext\jna.jar]
Reading library jar [C:\Program Files\Java\jdk1.7.0\jre\lib\ext\mysql-connector-java-5.1.21-bin.jar]
Reading library jar [C:\Program Files\Java\jre7\lib\rt.jar]
Reading library jar [C:\Library\Java\Home\lib\rt.jar]
D:\MEUS PROJETOS\_Workspace\JavaWorkspace\Mina\build.xml:28: Can't read [C:\Library\Java\Home\lib\rt.jar] (No such file or directory)
BUILD FAILED (total time: 5 seconds)
这很奇怪,因为我的项目库中没有调用 [C:\Library\Java\Home\lib\rt.jar](我的计算机中根本没有“C:\Library”)!
另外,如果已经从“C:\Program Files\Java\jre7\lib\rt.jar”调用了“rt.jar”,为什么还要再次调用它?
我完全不知道这是从哪里来的,也不知道我可以在哪里更改它(因为它不在我项目的库列表中)。
提前致谢!原谅我的英语不好...
已编辑:我刚刚发现编译(构建)应用程序时不会发生此问题,但是当 NetBeans 的 ProGuard4.8 插件尝试混淆时!