09:02:17 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
Details
Referring to the doc below, java 11 and above is required.
https://doc.casthighlight.com/product-tutorials-third-party-tools/automated-code-scan-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)
For Windows
Java 11 and above is required
Prior to using the command line, it is preferable to install the Highlight Local Agent on your machine, in order to embed the required Perl binaries. Alternatively, you can install the required Perl distribution (Strawberry) if you don’t want to install the Local Agent. The Local Agent can be downloaded from your Highlight user account, from the APPLICATION SCANS page.
For Linux Debian/Ubuntu
The following components must be installed on your machine: Perl 5 (tested on Strawberry 5.12.3.0), libjson-perl, libxml-libxml-perl
$>perl -v
on debian/ubuntu systems
$>dpkg –get-selections libxml-libxml-perl libjson-perl
Java 11 and above
$>java -version
|
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
Previous versions of the command line (5.4.8 and earlier) should still work on JRE 8.
|
Ticket
38048, 42210
References
Related Articles
CAST HIGHLIGHT - Keyword Scanner - Error when detecting the JRE version in pom.xml
How to detect apps using Oracle’s JDK 1.8 (and others) at the portfolio level
Comments