Loading... <div id="MathJax_Message" style="display: none;"></div><p>在执行 java -jar 时因为打包的原因 执行出现</p> <div data-mode="java"><pre><code>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)</code></pre></div> <p>解决方法:</p> <div data-mode="shell"><pre><code>zip -d crawl.jar META-INF/*.RSA META-INF/*.DSA META-INF/*.SF</code></pre></div> 最后修改:2020 年 09 月 14 日 © 允许规范转载 赞 0 如果觉得我的文章对你有用,请随意赞赏