线程" main"中的例外情况java.lang.SecurityException:Manifest主要属性的签名文件d igest无效

时间:2014-12-15 01:31:24

标签: java eclipse netbeans ant

我有一个应用程序,当在IDE(Netbeans 8)中运行时工作正常。该程序使用4个外部.jar库。它还有一个指向DLL的虚拟机参数。当我尝试从命令行执行.jar时,我收到一个错误。这让我相信存在类路径问题。

这是错误本身:

C:\Users\piuser\Documents\NetBeansProjects\GameTrakaDesktopClient\dist>java -jar
GameTrakaDesktopClient.jar
Exception in thread "main" java.lang.SecurityException: Invalid signature file digest for    
Manifest main attributes
        at sun.security.util.SignatureFileVerifier.processImpl(Unknown Source)
        at sun.security.util.SignatureFileVerifier.process(Unknown Source)
        at java.util.jar.JarVerifier.processEntry(Unknown Source)
        at java.util.jar.JarVerifier.update(Unknown Source)
        at java.util.jar.JarFile.initializeVerifier(Unknown Source)
        at java.util.jar.JarFile.getInputStream(Unknown Source)
        at sun.misc.URLClassPath$JarLoader$2.getInputStream(Unknown Source)
        at sun.misc.Resource.cachedInputStream(Unknown Source)
        at sun.misc.Resource.getByteBuffer(Unknown Source)
        at java.net.URLClassLoader.defineClass(Unknown Source)
        at java.net.URLClassLoader.access$100(Unknown Source)
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClass(Unknown Source)
        at java.security.SecureClassLoader.defineClass(Unknown Source)
        at java.net.URLClassLoader.defineClass(Unknown Source)
        at java.net.URLClassLoader.access$100(Unknown Source)
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at gametrakadesktopclient.MainMenuUI.main(MainMenuUI.java:242)

C:\Users\piuser\Documents\NetBeansProjects\GameTrakaDesktopClient\dist>

1 个答案:

答案 0 :(得分:0)

我使用了一种解决方法来解决这个问题,因为我无法找到解决方案。我打开了我的应用程序所依赖的所有JAR文件,并删除了META-INF / .DSA和META-INF / .SF文件