oh. This sounds like you installed both, a 32bit and a 64bit JVM. Since
windows keeps them separated in those two folders.
java -version should show what is what in case of doubt.
with JNI you have to be extra careful when the architecture changes.
best regards,
michael
On 26.10.22 18:06, Amitabh Choudhury wrote:
Yes Ernie. I am not getting a JNI error when I attempt to open JAR
from desktop shortcut.
Have to figure out how to reconfigure. There were two folders from
Oracle in the path
C:\Program Files (x86)\Common Files\Oracle\Java\javapath
C:\Program Files\Common Files\Oracle\Java\javapath
Amitabh Choudhury
On Tue, Oct 25, 2022 at 9:27 PM Ernie Rael <err...@raelity.com> wrote:
On 22/10/25 12:01 AM, Amitabh Choudhury wrote:
Hello Alexander and Ernie
Thanks for the reply.
Was able to get into the System variable of Windows 11 and
found that "Path" started with "C:\Program Files (x86)\Common
Files\Oracle\Java\javapath".
Even though 1.18 was installed and placed in "Path" at the end,
the x86 javapath was being picked up and had version 1.8.
Glad you got things going.
I'm guessing that means jdk18 was not installed with the oracle
windows installer. Keep in mind if/when you update to a newer jdk
you may need to fiddle with your path.
-ernie
deleted the string from "Path" and was able to get the app
(GabellatteMVPn) running.
Meanwhile got aware of
(https://javaalmanac.io/bytecode/versions/). TQ Ernie.
Warm regards
Amitabh Choudhury
On Tue, Oct 25, 2022 at 10:49 AM Ernie Rael <err...@raelity.com>
wrote:
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