Re: JDK version issue in NetBeans

Randall Wood <rhwood@...>
 

The second warning (“Supported source version 'RELEASE_7'...”) is unrelated to the first and must be ignored. It’s an artifact of a dependency using a strange feature of Java that turns out to be not so great.

As to the first warning, you should be able to set the JDK in NetBeans (I’m not by a computer right now, but I think it’s under the project properties). If you set the name of the JDK you are using to “JDK_1.8” that first warning will be ignored (it’s quite possible that the name is only the default name for a 1.8 JDK in the specific circumstances that I added a 1.8 JDK to the copy NetBeans when I made that change.

Randall

On Oct 16, 2019, at 14:58, Andrew Crosland <andrew@...> wrote:


Coming back to looking at the source after a few months, at the very start of a clean build I see a warning:
 
"ant -f D:\\JMRI\\nbproject\\nbjdk.xml clean debug
Warning: nbjdk.active=JDK_1.8 or nbjdk.home=${platforms.JDK_1.8.home} is an invalid Java platform; ignoring and using C:\Program Files\Java\jdk1.8.0_25"
 
There was a change on 20th June (more recent than my last use), to use JDK 1.8 in NetBeans if present.
 
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'"
 
In the IDE, tools > Java Platforms shows I am using JDK 1.8 from the C:\Program Files\... location
 
I don't want to edit the nbproject files to change nbjdk.active or set nbjdk.home (not currently set) in case I check them in and break someone else's build. I am guessing a path or environment variable is missing.
 
Can someone point me in the right direction to clean up the warnings?
 
--
Andrew Crosland

Join jmri@jmri-developers.groups.io to automatically receive all group messages.