This is an automated email from the ASF dual-hosted git repository. geertjan pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/netbeans-website.git
The following commit(s) were added to refs/heads/master by this push: new a6dc1b4 More additions around Java a6dc1b4 is described below commit a6dc1b4a7c1d31c2024d9f8438c351aed60f9719 Author: Geertjan Wielenga <geert...@apache.org> AuthorDate: Thu Feb 20 16:00:26 2020 +0100 More additions around Java --- .../src/content/download/nb113/index.asciidoc | 40 ++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/netbeans.apache.org/src/content/download/nb113/index.asciidoc b/netbeans.apache.org/src/content/download/nb113/index.asciidoc index e47011c..251c211 100644 --- a/netbeans.apache.org/src/content/download/nb113/index.asciidoc +++ b/netbeans.apache.org/src/content/download/nb113/index.asciidoc @@ -41,4 +41,44 @@ TIP: The LTS release of the Apache NetBeans 11 cycle is Apache NetBeans 11.0. Th The highlights of enhancements in the Java area are focused on support for JDK 14. +- link:https://openjdk.java.net/jeps/359[JEP 359]: Records (Preview Feature) +- link:https://openjdk.java.net/jeps/359[JEP 305]: Pattern Matching for instanceof (Preview Feature) + +TIP: link:https://openjdk.java.net/jeps/12[JEP 12] provides for a preview language or VM feature, which "is a new feature of the Java SE Platform that is fully specified, fully implemented, and yet impermanent. It is available in a JDK feature release to provoke developer feedback based on real world use; this may lead to it becoming permanent in a future Java SE Platform". + +Preview features can only be used if the Java compiler's `--enable-preview` flag is set, as shown below for Maven. + +[source,xml] +---- +<build> + <plugins> + <plugin> + <artifactId>maven-compiler-plugin</artifactId> + <version>3.8.0</version> + <configuration> + <compilerArgs> + <arg>--enable-preview</arg> + </compilerArgs> + </configuration> + </plugin> + </plugins> +</build> +---- + +An example to add `--enable-preview` in Gradle: + +[source,groovy] +---- +tasks.withType(JavaCompile).each { + it.options.compilerArgs.add('--enable-preview') +} + +run.jvmArgs(['--enable-preview']) +---- + +Other enhancements in the Java area. + +- link:https://openjdk.java.net/jeps/330[JEP 330]: Launch Single-File Source-Code Programs + + --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@netbeans.apache.org For additional commands, e-mail: commits-h...@netbeans.apache.org For further information about the NetBeans mailing lists, visit: https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists