CAST HIGHLIGHT - CLI - A JNI error has occurred, please check your installation and try again

While executing the command for HL scan you may get the following error : "Error: A JNI error has occurred, please check your installation and try again".
As JRE 8 active support ended on 31st March 2022, the next versions of CAST Highlight's Command Line requires JRE 11 as a minimum, for Highlight command line version 5.4.9 which was released on Saturday April 2nd 2022.
If you need to upgrade your JRE, you will typically get the error when using the command line:
Error: A JNI error has occurred, please check your installation and try again
Exception in thread "main" java.lang.UnsupportedClassVersionError: com/castsoftware/highlight/HighlightAutomation has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0
        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 sun.launcher.LauncherHelper.checkAndLoadMain(Unknown Source)
In case the command line still has the issue, check your environment variables to ensure JAVA_HOME and path point to the right folder (of the new JRE version):
mceclip1.png
Previous versions of the command line (5.4.8 and earlier) should still work on JRE 8.
NB: JDK version can be found out from a keyword scan. Please refer  https://doc.casthighlight.com/how-to-detect-apps-using-oracles-jdk-1-8-others-portfolio-level/ 
or do a $>java -version
Have more questions? Submit a request

Comments

Powered by Zendesk