I have created a Java Maven project with Java version 14 in Netbeans. I have already instructed the compiler to enable preview features, and that works.
Now I have a bunch of classes containing main methods, and I want to execute one of them using right-click on file ยป Run File. But I get a java.lang.UnsupportedClassVersionError saying that "Preview features are not enabled". How can I execute the Run File action with preview features enabled?
This can be configured within the project properties.
exec.argsproperty by adding--enable-previewimmediately behind the equals sign.