gpt4 book ai didi

java - 线程 "main"java.lang.SecurityException : Invalid signature file d igest for Manifest main attributes 中的异常

转载 作者:搜寻专家 更新时间:2023-11-01 03:51:14 25 4
gpt4 key购买 nike

我有一个在 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>

最佳答案

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

关于java - 线程 "main"java.lang.SecurityException : Invalid signature file d igest for Manifest main attributes 中的异常,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27476204/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com