On 22/10/24 10:14 PM, Ernie Rael wrote:
On 22/10/24 9:50 PM, Amitabh Choudhury wrote:
Hi
I am not exposed to under the hood of netbeans settings, hence
require hand-holding.
Application is working fine in Netbeans IDE. But when I use a
shortcut link to the jar file or try to run in the console, I get the
following error message.
~~~~~
Error: A JNI error has occurred, please check your installation and
try again
Exception in thread "main" java.lang.UnsupportedClassVersionError:
gabellattemvpn/GabellatteMVPn has been compiled by a more recent
version of the Java Runtime (class file version 62.0), this version
of the Java Runtime only recognizes class file versions up to 52.0
~~~~~
Taking a look at https://javaalmanac.io/bytecode/versions/
I see that 52 is java 8, 62 is java 18.
Your jre is java 8 (presumably this is the default jre on your windows
system), you compiled it (assuming GabellatteMVPn is yours), on java 18.
I'd be inclined to update your system with a newer jre. The
alternative is to compile your program to run on java 8.
-ernie
And of course, you can use the jdk/jre that NetBeans runs on to execute
your jar file.
-ernie
Please inform what changes have to be done and where (Netbeans/Console).
I am using MS Windows 11(or 10).
Warm regards
Amitabh Choudhury
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@netbeans.apache.org
For additional commands, e-mail: users-h...@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@netbeans.apache.org
For additional commands, e-mail: users-h...@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists