0

I am trying to launch my application on java 8u231, but it failed with error "A JNI error has occurred, please check your installation and try again". However, the same application can be launched on java 8u102.

java -version
java version "1.8.0_231"
Java(TM) SE Runtime Environment (build 1.8.0_231-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.231-b11, mixed mode)

PATH=%PATH%;.\lib
java -D... -Xmx512m MyFullApplication
11/18-16:23:49.00356 [main#1] jdk.internal.event.EventHelper.logX509CertificateEvent
FINE: X509Certificate: Alg:{0}, Serial:{1}, Subject:{2}, Issuer:{3}, Key type:{4}, Length:{5}, Cert Id:{6}, Valid from:{7}, Valid until:{8}
Error: A JNI error has occurred, please check your installation and try again
Exception in thread "main" java.lang.NullPointerException
        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.ensureInitialization(Unknown Source)
        at java.util.jar.JavaUtilJarAccessImpl.ensureInitialization(Unknown Source)
        at sun.misc.URLClassPath$JarLoader$2.getManifest(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 sun.launcher.LauncherHelper.checkAndLoadMain(Unknown Source)

I am launching my application from command line but not from the Eclipse. The jar file is pre-built and I can launch the jar with java 8u102 and java 8u221, but it can not be launched by java 8u231, so I guess is there bug of JRE itself which introduced this issue?

贺世权
  • 1
  • 1
  • 1
    Does this answer your question? [A JNI error has occurred, please check your installation and try again in Eclipse x86 Windows 8.1](https://stackoverflow.com/questions/22381202/a-jni-error-has-occurred-please-check-your-installation-and-try-again-in-eclips) – dgebert Nov 18 '19 at 08:54
  • Do you have two different versions of jdk installed in your machine? – Kavitha Karunakaran Nov 19 '19 at 07:54

0 Answers0