Re: Netbeans 22 does not allow JDK 1.7 or 1.8

2024-03-02 Thread Noel Abela
You can clearly see from the filename in the screen shot that it is not 
a jre but a JDK. I got it from the oracle site here


https://www.oracle.com/java/technologies/javase/javase8-archive-downloads.html

I guess it is a bug.

Thanks for the other tips

On 01/03/2024 22:56, Noel Abela wrote:

Thanks again for your input.

As you can see from the  attached screenshot I am getting the same 
error for Java 8. But thanks to your suggestion, I managed to install 
8 anyway by downloading it from within the platform manager itself.


As for the version issue, I am not sure if I am explaining myself 
well. Below is the link where one can install the latest version of 
Java which is 8. This is what the users of my application will do 
before running my application.


https://www.java.com/download/ie_manual.jsp

If I build my application with a higher JDK their java will not allow 
them to run my application. I would have to install their Java runtime 
myself. I was just looking into this jlink that you mentioned and I 
must say it looks interesting. What will have to be seen however, is 
the final size of the distribution package. This will obviously be 
larger than my present jar file and this will make updates more 
inefficient but to what degree is what needs to be seen. I will 
certainly try this out.


I will venture an answer to my own question of why java 8 is the 
latest jre available. Is it maybe because jlink started from JDK9? If 
so, then they are assuming that everyone will be using jlink which 
might not be the case.



On 01/03/2024 19:01, Michael Bien wrote:

On 01.03.24 18:24, Noel Abela wrote:
I am confused about all these versions. How come if you download the 
latest JRE from Oracle


this explains it. The platform manager expects a JDK, not a JRE. The 
concept of JRE is a bit dated and no longer well defined since the 
introduction of jlink, which allows to create your own JRE if needed.


I thought we added a better error msg in case a user tries to 
register a JRE - apparently not ;)




you get Java 8 since the JDK went all the way up to 21?


yeah. so here is the summary:

 - NetBeans 21 requires JDK 11, 17, or 21 to run as you can see on 
the download page.


 - You should be able to register JDK 8 or later using the java 
platform manager and use it for your projects.


 - 1.7 won't be possible anymore since the editor of NB relies on a 
recent version of javac (which is bundled with NB), and javac itself 
does no longer support the Java 7 target (8 works fine)



How come if you download the latest... 


The Platform Manager itself can download JDKs.

This community maintained website might also help to find a version 
from a vendor you prefer: https://javaalmanac.io/


If you install a JDK using tools like sdkman or a regular repository 
on linux, NB should automatically add it to the platform manager 
since it scans some well-known directories.


best regards,

-mbien



On 01/03/2024 16:15, Michael Bien wrote:
NetBeans 21 supports projects which use JDKs in the rage 8-21 with 
limited support for early access dev builds 22, 23 etc.


javac itself dropped support for the 1.7 target in Java 20.

So your best bet would be to try NetBeans 17 which used nb-javac 
based on JDK 19. Although I can't promise that this will work since 
I don't think anyone tested anything with Java 7 for quite some time.


-mbien

On 01.03.24 10:32, Noel Abela wrote:

I have just installed Nebeans 22 which is using JDK 21.
I need to maintain a desktop application which is on JDK 1.7 but 
when I attempt to add this JDK and even JDK 1.8, Netbeans gives 
the following error ...



"Cannot detect and install the selected platform. The Java or 
javac may not be executable."


I have read in other forums that this was a bug way back in 
version 10 or 11.

I would have imagined that this would have been solved by version 22.
Does anyone know some fix or workaround for this?

-
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



Re: Netbeans 22 does not allow JDK 1.7 or 1.8

2024-03-01 Thread Noel Abela

Thank you for your input.

8-21 you say? But i tried Java 8 too and it gave the same error.

I am confused about all these versions. How come if you download the 
latest JRE from Oracle you get Java 8 since the JDK went all the way up 
to 21?


On 01/03/2024 16:15, Michael Bien wrote:
NetBeans 21 supports projects which use JDKs in the rage 8-21 with 
limited support for early access dev builds 22, 23 etc.


javac itself dropped support for the 1.7 target in Java 20.

So your best bet would be to try NetBeans 17 which used nb-javac based 
on JDK 19. Although I can't promise that this will work since I don't 
think anyone tested anything with Java 7 for quite some time.


-mbien

On 01.03.24 10:32, Noel Abela wrote:

I have just installed Nebeans 22 which is using JDK 21.
I need to maintain a desktop application which is on JDK 1.7 but when 
I attempt to add this JDK and even JDK 1.8, Netbeans gives the 
following error ...



"Cannot detect and install the selected platform. The Java or javac 
may not be executable."


I have read in other forums that this was a bug way back in version 
10 or 11.

I would have imagined that this would have been solved by version 22.
Does anyone know some fix or workaround for this?

-
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



Netbeans 22 does not allow JDK 1.7 or 1.8

2024-03-01 Thread Noel Abela

I have just installed Nebeans 22 which is using JDK 21.
I need to maintain a desktop application which is on JDK 1.7 but when I 
attempt to add this JDK and even JDK 1.8, Netbeans gives the following 
error ...



"Cannot detect and install the selected platform. The Java or javac may 
not be executable."


I have read in other forums that this was a bug way back in version 10 
or 11.

I would have imagined that this would have been solved by version 22.
Does anyone know some fix or workaround for this?

-
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