You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@netbeans.apache.org by ge...@apache.org on 2020/06/03 10:40:17 UTC

[netbeans-website] branch master updated: adding Java content

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 9318a5e  adding Java content
9318a5e is described below

commit 9318a5ef037e314aa2123b6fe9de9174bac978eb
Author: Geertjan Wielenga <ge...@apache.org>
AuthorDate: Wed Jun 3 12:40:08 2020 +0200

    adding Java content
---
 .../src/content/download/nb120/index.asciidoc      | 59 +++++++++++++++++++++-
 1 file changed, 58 insertions(+), 1 deletion(-)

diff --git a/netbeans.apache.org/src/content/download/nb120/index.asciidoc b/netbeans.apache.org/src/content/download/nb120/index.asciidoc
index 24f4d75..529be6a 100644
--- a/netbeans.apache.org/src/content/download/nb120/index.asciidoc
+++ b/netbeans.apache.org/src/content/download/nb120/index.asciidoc
@@ -33,7 +33,7 @@
 
 Welcome to Apache NetBeans 12.0 is the LTS release for 2020 of the link:https://cwiki.apache.org/confluence/display/NETBEANS/Release+Schedule[Apache NetBeans quarterly release cycle].
 
-TIP: The LTS release of the Apache NetBeans 12 cycle is Apache NetBeans 12.0, which consolidates the feature releases 11.1, 11.2, and 11.3. Feature releases have not been tested as heavily as the LTS release, which passes through the NetCAT Community Acceptance process and is therefore the annual major release.
+TIP: The LTS release of the Apache NetBeans 12 cycle is Apache NetBeans 12.0, which consolidates the feature releases 11.1, 11.2, and 11.3. Feature releases have not been tested as heavily as the LTS release, which passes through the link:https://cwiki.apache.org/confluence/display/NETBEANS/Results+from+Apache+NetBeans+IDE+12.0+Community+Acceptance+survey[NetCAT Community Acceptance process] and is for these reasons the annual major release.
 
 link:/download/nb120/nb120.html[Download, role="button success"]
 
@@ -41,4 +41,61 @@ Below are the highlights of Apache NetBeans 12.0, for a full list, see the link:
 
 == Release Drivers
 
+=== Java
+
+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) -- syntax coloring for the new "record" keyword; Navigator shows equals, hashCode, toString, etc; and formatting support for records.
+
+[.feature]
+--
+image::record-keyword.png[role="left", link="record-keyword.png"]
+-- 
+
+- link:https://openjdk.java.net/jeps/305[JEP 305]: Pattern Matching for instanceof (Preview Feature) 
+
+[.feature]
+--
+image::ezgif.com-video-to-gif.gif[role="left", link="ezgif.com-video-to-gif.gif"]
+--  
+
+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'])
+----
+
+TIP: To use JDK 14 features, such as the new "record" keyword, in the Java Editor, you'll need to run Apache NetBeans 11.3 itself on JDK 14, so that Apache NetBeans will use the Java compiler from JDK 14 for code recognition, syntax coloring, etc. Also, make sure to uninstall nb-javac, if it is installed, and not to install and use it, when prompted, so that the Java compiler from JDK 14 will be used, rather than nb-javac, which does not support JDK 14.
+
+Other enhancements in the Java area.
+
+- link:https://openjdk.java.net/jeps/330[JEP 330]: Launch Single-File Source-Code Programs -- single Java source files can be created, outside of projects, in the Favorites window, and they can be run and debugged, if NetBeans is running on JDK 11 or later.
+ 
+- link:https://openjdk.java.net/jeps/355[JEP 355]: Text Blocks (Preview) -- in addition to the Text Block features introduced to the Java Editor in previous 11.x releases, a new Java editor hint has been introduced in 11.3 for reverting from Text Block to String. 
 


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@netbeans.apache.org
For additional commands, e-mail: commits-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists