Indeed that is the solution. I had previously only deactivated the nb-javac plugin.
But what if someone wants to have both the preview features and nb-javac benefits? A checkbox "enable-preview" in the project properties , that would patch the pom and bypass nb-javac would be helpful Am Sa., 1. Feb. 2020 um 20:32 Uhr schrieb Geertjan Wielenga < geert...@apache.org>: > Excellent that you got it to work. > > Gj > > On Sat, 1 Feb 2020 at 20:30, Benjamin Graf <benjamin.g...@gmx.net> wrote: > > > Good catch! :-) Uninstalling nb-javac works. I'm wondering why just > > deactivating does not solve it. Tried both scenarios. > > > > Benjamin > > > > On 01.02.2020 20:18, Geertjan Wielenga wrote: > > > Probably because you are using nb-javac without realizing it. > > > > > > In the Plugin Manager, look for it in the Installed tab and then > > uninstall > > > it. > > > > > > Gj > > > > > > > > > On Sat, Feb 1, 2020 at 8:17 PM Benjamin Graf <benjamin.g...@gmx.net> > > wrote: > > > > > >> Hi Geertjan, > > >> > > >> still the same errors shown in editor: > > >> > > >> *Product Version:* Apache NetBeans IDE 11.3-beta2 > > >> > > >> *Java:* 14; OpenJDK 64-Bit Server VM 14+33-202001311506 > > >> > > >> *Runtime:* OpenJDK Runtime Environment 14+33-202001311506 > > >> > > >> *System:* Windows 10 version 10.0 running on amd64; Cp1252; de_DE (nb) > > >> > > >> Regards > > >> > > >> Benjamin > > >> On 01.02.2020 19:59, Geertjan Wielenga wrote: > > >> > > >> Can you try to reproduce with this: > > >> https://github.com/geertjanw/jdk14-preview-enabled > > >> > > >> Gj > > >> > > >> On Sat, Feb 1, 2020 at 6:24 PM Benjamin Graf <benjamin.g...@gmx.net> > < > > benjamin.g...@gmx.net> wrote: > > >> > > >> > > >> Hi, > > >> > > >> I can confirm this behavior for new JDK14 preview features records and > > >> instanceof expression. Running IDE with JDK14 default does not > suffice. > > By > > >> the way. I only get the project (ant based) running if directly > execute > > run > > >> target of build-impl.xml. "Official" way results in > > >> > > >> java.lang.UnsupportedClassVersionError: > > javaapplication1/JavaApplication1 (class file version 57.65535) was > > compiled with preview features that are unsupported. This version of the > > Java Runtime only recognizes preview features for class file version > > 58.65535 > > >> > > >> Might be an ant integration issue with recompiling classes before > > >> executing the java process. (Remove compile on save helps!) > > >> > > >> Regards > > >> > > >> Benjamin > > >> On 01.02.2020 17:59, Miguel Cardoso Martins wrote: > > >> > > >> Hi Geertjan > > >> > > >> thanks for the info, didn't know that. > > >> I start NetBeans with jdk14 now, but still the java editor shows me a > > red > > >> line under the record declaration. > > >> > > >> Am Sa., 1. Feb. 2020 um 16:26 Uhr schrieb Geertjan Wielenga < > > geert...@apache.org> <geert...@apache.org>: > > >> > > >> > > >> NetBeans itself needs to run on JDK 14. > > >> > > >> The javac from JDK 14 will be used for support for Records. > > >> > > >> The nb-javac support has not yet been updated for JDK 14, which you > > would > > >> need to install for JDK 14 support when not running NetBeans itself on > > JDK > > >> 14. > > >> > > >> Gj > > >> > > >> On Sat, Feb 1, 2020 at 4:18 PM Miguel Cardoso Martins < > > miguelcardosomart...@gmail.com> <miguelcardosomart...@gmail.com> wrote: > > >> > > >> > > >> Hello all. > > >> > > >> I setup a maven project and enabled the preview features but Netbeans > > is > > >> not recognizing the record keyword (see attachment). > > >> It compiles and runs without errors though. > > >> > > >> Netbeans itself is running on JDK13 > > >> Application is configured to run with JDK14 and has source/compile/run > > >> language level also set to 14. > > >> > > >> Thanks > > >> Miguel > > >> > > >> --------------------------------------------------------------------- > > >> To unsubscribe, e-mail: dev-unsubscr...@netbeans.apache.org > > >> For additional commands, e-mail: dev-h...@netbeans.apache.org > > >> > > >> For further information about the NetBeans mailing lists, visit: > > https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists > > >> > > >> > > > > >