无法读取 /usr/lib/jvm/jdk1.8.0_60/jre/lib/rj.jar ProGuard NetBeans



我正在使用Ubuntu x64 15.04和netbeans ide,我试图使用proguard,所以创建了proguard。支持文件:

-libraryjars /usr/lib/jvm/jdk1.8.0_60/jre/lib/rj.jar
-libraryjars libs/json-simple-1.1.1.jar
-libraryjars libs/sqlite-jdbc-3.8.10.1.jar
-injars      dist/MyApp.jar
-outjars     dist/MyApp-v1.jar
-keepclasseswithmembers public class * {
  public static void main(java.lang.String[]);
}
-optimizationpasses 3
-overloadaggressively
-repackageclasses ''
-allowaccessmodification
-printmapping proguard-mapping.txt

并修改了build.xml文件:

<project name="MyApp" default="default" basedir=".">
<description>Builds, tests, and runs the project MyApp.</description>
<import file="nbproject/build-impl.xml"/>
<target name="-post-jar">
    <taskdef resource="proguard/ant/task.properties" classpath="libs/proguard/proguard.jar" />
    <proguard configuration="proguard.pro"/>
</target>
</project>

但是当我尝试编译和构建MyApp时,我得到以下错误:

ProGuard, version 5.2.1
Reading program jar [/home/muhammad/java/MyApp/dist/MyApp.jar]
Reading library jar [/usr/lib/jvm/jdk1.8.0_60/jre/lib/rj.jar]
/home/muhammad/java/MyApp/build.xml:8: 
Can't read [/usr/lib/jvm/jdk1.8.0_60/jre/lib/rj.jar] (No such file or directory)
BUILD FAILED (total time: 0 seconds)

如果有人能帮助我解决这个错误,那就太好了,在这一点上,我只能想到改变/usr/lib/jvm/jdk1.8.0_60/jre/lib/rj.jar的权限,以便netbeans可以访问它,但想知道这样做是否好。或者有合适的方法来解决这个问题…提前谢谢。

可能是打错字了——你是说rt.jar吗?

相关内容

  • 没有找到相关文章

最新更新