Hi Richard.
Check a couple of things for me:
- pom.xml:
    - Under properties:
        - <java.version>*16*</java.version>
          <jdk.version>*${java.version}*</jdk.version>
          <maven.compiler.source>*${java.version}*</maven.compiler.source>
          <maven.compiler.target>*${java.version}*</maven.compiler.target>
- Project Properties: Select the project/right click/select Properties:
    - Select Sources: Source/Binary Format: *16*
    - Build/Compile: Java Platform: *JDK 16 (Default)* <= default reference is optional

If these are as you have them, let me know.  Further digging will be necessary. 😁
The Project Properties has caught me out a number of times. 😮

Brad.

On 13/11/21 05:34, Richard Schmidt wrote:
I have installed graalvm-ce-java16-21.2.0 which provides java 16 SDK and and have downloaded and installed openjfx.io <http://openjfx.io> OpenJFX 16 and have developed a javafx Maven projects in NetBeans 12.4 which has ben working fine. Now I have declared the following record (the new data record type introduced in Java 14):

record EventTargetFinder(List<Class<? extends Node>> filterTargetTypes) {
    EventTargetFinder(List<Class<? extends Node>> filterTargetTypes) {
        this.filterTargetTypes = Collections.unmodifiableList(filterTargetTypes);
    }

NetBeans is telling me "records are not supported in -source 11 (use -source 16 or higher to enable records)".

I have searched Google and StackOverFlow and am unable to find relavant information. I have examined the NetBeans project properties and have found that the porject compiles with Java 16, but in the category "Sources" there is label "Source/Binary Format:" with a combo box with the entry "11"  selected and I am unable to change the selection.

Any help with getting over this hump would be appreciated.

Reply via email to