You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@netbeans.apache.org by Amitabh Choudhury <am...@gmail.com> on 2022/10/25 04:50:32 UTC

jre version issues

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
~~~~~

Please inform what changes have to be done and where (Netbeans/Console).

I am using MS Windows 11(or 10).

Warm regards

Amitabh Choudhury

Re: jre version issues

Posted by Amitabh Choudhury <am...@gmail.com>.
TQ Michael for the info. The JNI error on clicking the short-cut link from
the desktop happens. For now I have set short-cut to a ".bat" file on the
desktop and working around that mode.

Have to looking into this JNI issue.

Warm regards

Amitabh Choudhury

On Wed, Oct 26, 2022 at 9:48 PM Michael Bien <mb...@gmail.com> wrote:

> 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 <er...@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 <er...@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-unsubscribe@netbeans.apache.org
>>> > For additional commands, e-mail: users-help@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-unsubscribe@netbeans.apache.org
>>> For additional commands, e-mail: users-help@netbeans.apache.org
>>>
>>> For further information about the NetBeans mailing lists, visit:
>>> https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
>>>
>>>
>>
>

Re: jre version issues

Posted by Michael Bien <mb...@gmail.com>.
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 <er...@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 <er...@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-unsubscribe@netbeans.apache.org
>>         > For additional commands, e-mail: users-help@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-unsubscribe@netbeans.apache.org
>>         For additional commands, e-mail: users-help@netbeans.apache.org
>>
>>         For further information about the NetBeans mailing lists, visit:
>>         https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
>>
>

Re: jre version issues

Posted by Amitabh Choudhury <am...@gmail.com>.
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 <er...@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 <er...@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-unsubscribe@netbeans.apache.org
>> > For additional commands, e-mail: users-help@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-unsubscribe@netbeans.apache.org
>> For additional commands, e-mail: users-help@netbeans.apache.org
>>
>> For further information about the NetBeans mailing lists, visit:
>> https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
>>
>>
>

Re: jre version issues

Posted by Ernie Rael <er...@raelity.com>.
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 <er...@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-unsubscribe@netbeans.apache.org
>     > For additional commands, e-mail: users-help@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-unsubscribe@netbeans.apache.org
>     For additional commands, e-mail: users-help@netbeans.apache.org
>
>     For further information about the NetBeans mailing lists, visit:
>     https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
>

Re: jre version issues

Posted by Amitabh Choudhury <am...@gmail.com>.
TQ for this info Pieter. Have to play around with the Environment variables.

Warm regards

Amitabh Choudhury

On Tue, Oct 25, 2022 at 10:26 PM Pieter van den Hombergh <
pieter.van.den.hombergh@gmail.com> wrote:

> the path is a sequence of directories. the algorithm that tries to find an
> executable file uses the directies in path order and the first file in any
> directory that matches the request is the one used. so adding a directory
> at the end will have no effect if an earlier directory satisfies the
> request.
>
> Op di 25 okt. 2022 09:02 schreef Amitabh Choudhury <
> amitabhisgood@gmail.com>:
>
>> 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.
>> 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 <er...@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-unsubscribe@netbeans.apache.org
>>> > For additional commands, e-mail: users-help@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-unsubscribe@netbeans.apache.org
>>> For additional commands, e-mail: users-help@netbeans.apache.org
>>>
>>> For further information about the NetBeans mailing lists, visit:
>>> https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
>>>
>>>

Re: jre version issues

Posted by Pieter van den Hombergh <pi...@gmail.com>.
the path is a sequence of directories. the algorithm that tries to find an
executable file uses the directies in path order and the first file in any
directory that matches the request is the one used. so adding a directory
at the end will have no effect if an earlier directory satisfies the
request.

Op di 25 okt. 2022 09:02 schreef Amitabh Choudhury <amitabhisgood@gmail.com
>:

> 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.
> 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 <er...@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-unsubscribe@netbeans.apache.org
>> > For additional commands, e-mail: users-help@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-unsubscribe@netbeans.apache.org
>> For additional commands, e-mail: users-help@netbeans.apache.org
>>
>> For further information about the NetBeans mailing lists, visit:
>> https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
>>
>>

Re: jre version issues

Posted by Amitabh Choudhury <am...@gmail.com>.
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.
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 <er...@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-unsubscribe@netbeans.apache.org
> > For additional commands, e-mail: users-help@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-unsubscribe@netbeans.apache.org
> For additional commands, e-mail: users-help@netbeans.apache.org
>
> For further information about the NetBeans mailing lists, visit:
> https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
>
>

Re: jre version issues

Posted by Ernie Rael <er...@raelity.com>.
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-unsubscribe@netbeans.apache.org
> For additional commands, e-mail: users-help@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-unsubscribe@netbeans.apache.org
For additional commands, e-mail: users-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


Re: jre version issues

Posted by Ernie Rael <er...@raelity.com>.
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

>
> 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-unsubscribe@netbeans.apache.org
For additional commands, e-mail: users-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists