菜单

Invalid signature file digest for Manifest main attributes

2018年6月4日 - 问题记录

在执行 java -jar 时因为打包的原因 执行出现

Error: A JNI error has occurred, please check your installation and try again

Exception in thread "main" java.lang.SecurityException: Invalid signature file digest for Manifest main attributes

        at sun.security.util.SignatureFileVerifier.processImpl(SignatureFileVerifier.java:284)

        at sun.security.util.SignatureFileVerifier.process(SignatureFileVerifier.java:238)

        at java.util.jar.JarVerifier.processEntry(JarVerifier.java:316)

        at java.util.jar.JarVerifier.update(JarVerifier.java:228)

        at java.util.jar.JarFile.initializeVerifier(JarFile.java:383)

        at java.util.jar.JarFile.getInputStream(JarFile.java:450)

        at sun.misc.URLClassPath$JarLoader$2.getInputStream(URLClassPath.java:940)

        at sun.misc.Resource.cachedInputStream(Resource.java:77)

        at sun.misc.Resource.getByteBuffer(Resource.java:160)

        at java.net.URLClassLoader.defineClass(URLClassLoader.java:454)

        at java.net.URLClassLoader.access$100(URLClassLoader.java:73)

        at java.net.URLClassLoader$1.run(URLClassLoader.java:368)

        at java.net.URLClassLoader$1.run(URLClassLoader.java:362)

        at java.security.AccessController.doPrivileged(Native Method)

        at java.net.URLClassLoader.findClass(URLClassLoader.java:361)

        at java.lang.ClassLoader.loadClass(ClassLoader.java:424)

        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)

        at java.lang.ClassLoader.loadClass(ClassLoader.java:357)

        at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:495)

解决方法:

zip -d crawl.jar META-INF/*.RSA META-INF/*.DSA META-INF/*.SF

标签:,

发表评论

电子邮件地址不会被公开。 必填项已用*标注