Re: JDK version issue in NetBeans

Andrew Crosland

Thanks. I think the problem was that the JDK was "JDK 1.8 (Default)". Adding "JDK 1.8" removes the warning.


------ Original Message ------
From: "Svata Dedic" <svatopluk.dedic@...>
Sent: 16/10/2019 22:29:01
Subject: Re: [jmri-developers] JDK version issue in NetBeans

Dne 16. 10. 19 v 20:58 Andrew Crosland napsal(a):
start of a clean build I see a warning:
"ant -f D:\\JMRI\\nbproject\\nbjdk.xml clean debug
Warning: or nbjdk.home=${platforms.JDK_1.8.home} is an invalid Java platform; ignoring and using C:\Program
Your project is set up to look for Java Platform named "JDK 1.8" (the space is replaced by underscore for setting persistence). The default JDK used to run NetBeans IDE may be present, but has a different (builtin, fixed) name, so it does not count.

Add any JDK8 with that name (Tools > Java Platforms) to your NetBeans IDE.

The way how the project is set up today does not allow to override versioned
with your private defaults; the versioned property file is loaded first, the (local) user build properties later. Ant only honours first definition of the property.

The project seems to build OK, at the end of the process I see this warning, which I am guessing is related:
"warning: Supported source version 'RELEASE_7' from annotation processor 'org.netbeans.modules.openide.util.ServiceProviderProcessor' less than -source '1.8'"
You can't do anything about it in JMRI, but it can be done in Apache NetBeans project (JMRI uses org.openide.lookup library). The annotation processor could (finally !!) declare RELEASE_8, as NetBeans already supports just JDK8+ for compilation.


Andrew Crosland

Join to automatically receive all group messages.