Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[jetty-dev] JDK 21 Is Now GA, a New VS Code Extension, and an Annotation Processing Heads-up
  • From: David Delabassee <david.delabassee@xxxxxxxxxx>
  • Date: Fri, 20 Oct 2023 09:46:32 +0000
  • Accept-language: en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=fQNtwgsmPngRNJiWz7OLNImZ0LOZ3L0+fygmEQWlE4k=; b=DQQGxS8HaxpH6qVzwULN2k/SiaYFAxTA2K8ThIMarudbDHaphs1zC6S4YiDImiaCqaahTca8mhdKCdj1xqFdJ4EPKFeTPYfdPgcXNxl69Qy/IZ6xDK9xHAdDLax9i1HgJR5s5IeHqseVq+JH54KbEIwDfEF1pK+TJyNzrXWd7qSTtWv8W54A5zAx9U7ehKG5HEWIx06kNbzXpH9an2aw05c5Sc2NUp0hWLvXgvym8pbUikDNrccwZ1P2aLDtpXwQa/jG0H1lX5T9HAYxulAwXoPeUGugC/nvmA3jCeX1Yn6Letfc+ahK3WOam+PA8bKB9yIZ9Npv85RS2V/dcoGrUg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=nDgntrNtQhCltaxWst1j7y1lTAbX9spK1p6HKGoufzdZdwm2dI2KlQGwgPKjz7kO+SIiZwyOMzDHk9Zvx1pW+5b6Gtt00sxo8yhvfPV3wR3XAGAeL74NZYh27jT+iU1zVQjK9RulEod4W9cy7kcmbSnQ1HCgNHsxGxyzbReGDr6VMmkgVSRrPNAlPQHxJSC07/iujLa8ilVasun932qthfN5wqdCua5w8QrtfwLNhUpLgJQ2fjNdVGCsAX8cQV6/hhjRpcc1GRwPJ+KBy1YIsuRJtxmUJmZwSKZ/2TX+Tf7GLfURi8pD/hyp3OA2w2+J6csCYiiRz0k6kxiueA2cog==
  • Delivered-to: jetty-dev@xxxxxxxxxxx
  • List-archive: <https://www.eclipse.org/mailman/private/jetty-dev/>
  • List-help: <mailto:jetty-dev-request@eclipse.org?subject=help>
  • List-subscribe: <https://www.eclipse.org/mailman/listinfo/jetty-dev>, <mailto:jetty-dev-request@eclipse.org?subject=subscribe>
  • List-unsubscribe: <https://www.eclipse.org/mailman/options/jetty-dev>, <mailto:jetty-dev-request@eclipse.org?subject=unsubscribe>
  • Thread-index: AQHaAzpLSEqHFmVAGUe5Z1bj2Ciriw==
  • Thread-topic: JDK 21 Is Now GA, a New VS Code Extension, and an Annotation Processing Heads-up

Greetings!

 

JDK 21 has been released (General Availability) on September 19th as planned. You can find "The Arrival of Java 21" announcement here [1], and some additional Java 21 materials in the "Topics of Interest" section below. On behalf of the entire Java team, let me send our thanks to all of you. Through your active participation in this program, you are helping shape the Java platform!

 

Needless to say, that Java 21 is an important release, so may I ask you to send me a brief email with the Java 21 support status of your project(s): Already supported - Plan to support short-term - Don't plan to support short-term ?

 

And now that JDK 21 is out, let's shift our attention to JDK 22 which will enter the Rampdown Phase in less than 50 days on December 7 [2].

 

I want to conclude this update by briefly mentioning three different initiatives to are relevant to this group as they are, in their own way and at various levels, contributing to adopt newer Java releases more rapidly: the Class-File API, Oracle's Java Platform extension for VS Code, and the Java Playground.

 

### The Class-File API

 

The Class-File API is a new standard API for parsing, generating, and transforming Java class files. One of its unique aspects is that it will co-evolve with the class-file format, which overtime will greatly reduce the friction of implementing new class-file features. With the fast-paced evolution of the Java platform, this was much-needed. This API should soon be previewed and as it matures, we expect the JDK to switch from using various custom class-file libraries to this standard API. We also expect that overtime frameworks relying on bytecode manipulation will also benefit from using this new JDK class-file library. For more information, please check this recent Newscast [3] for an overview, Brian Goetz's JVMLS session [4] for more details and design considerations, and JEP 457: Class-File API (Preview) [5] for the technical details.

 

### Oracle's Java Platform extension for Visual Studio Code

 

Oracle has just announced [6] a new Visual Studio Code extension for Java developers. Unlike other VS Code extensions, this new extension is using under the hood the `javac` compiler for code editing and compilation, and OpenJDK's debugger interface for debugging. This enables us to offer VS Code IDE support for new JDK features as soon as they are introduced, even during JDK Early Access phases. To this effect, this VS Code Extension will support the current JDK releases as well as the next upcoming JDK version. For more information, please check the announcement [6].

 

### The Java Playground

 

The Java Playground [7] is an online sandbox that helps testing and exploring new Java language features. No setup required, just type your Java snippet in your browser and run it! Right now, the Playground is using Java 21 with Preview Features enabled, and it will switch to a new Java version as soon as there is a new Java language features integrated in OpenJDK Early-Access builds. The Playground is focusing mostly on Project Amber and is certainly not mean to be some sort of a lightweight online-IDE, it is instead a learning tool to play with new Java language feature shortly after they have been integrated into the platform.

 

[1] https://inside.java/2023/09/19/the-arrival-of-java-21/

[2] https://mail.openjdk.org/pipermail/jdk-dev/2023-September/008269.html

[3] https://www.youtube.com/watch?v=bQ2Rwpyj_Ks

[4] https://www.youtube.com/watch?v=pcg-E_qyMOI

[5] https://openjdk.org/jeps/457

[6] https://inside.java/2023/10/18/announcing-vscode-extension/

[7] https://dev.java/playground

 

 

## Heads-Up - JDK 22: Implicit Annotation Processing Behavior Change

 

As discussed in the July 2023 Quality Outreach update [8], starting in JDK 21 javac emits a note if _implicit_ annotation processing is being used, that is, if one or more annotation processors are found and run from the class path when no explicit annotation processing configuration options are used.

 

The note is reported since, quoting from the note text: "A future release of javac may disable annotation processing unless at least one processor is specified by name (-processor), or a search path is specified (--processor-path, --processor-module-path), or annotation processing is enabled explicitly (-proc:only, -proc:full)."

 

That future version of javac has arrived in JDK 22 b19+ with JDK-8306819 ("Consider disabling the compiler's default active annotation processing"). In the situation where a note was emitted in JDK 21, in JDK 22 no note is emitted, and annotation processors are *not* run. To restore the previous behavior with respect to running annotation processors, add the '-proc:full' javac option.

 

Feedback on the annotation processing policy change can be sent to compiler-dev [9].

 

[8] https://mail.openjdk.org/pipermail/quality-discuss/2023-July/001122.html

[9] https://mail.openjdk.org/mailman/listinfo/compiler-dev

 

 

## JDK 21 General Availability

 

JDK 21, the reference implementation of Java 21, is now Generally Available [10]. The OpenJDK GA 21.0.1 builds are available [11], and are provided under the GNU General Public License v2, with the Classpath Exception. The Release Notes [12] and the Javadocs [13] are also available.

 

[10] https://mail.openjdk.org/pipermail/jdk-dev/2023-September/008267.html

[11] https://jdk.java.net/21/

[12] https://jdk.java.net/21/release-notes

[13] https://docs.oracle.com/en/java/javase/21/docs/api/index.html

 

 

## JavaFX 21 GA Builds & JavaFX 22 EA Builds

 

Open-source builds of JavaFX 21 are now Generally Available [14], under the GNU General Public License, version 2, with the Classpath Exception. The Release Notes [15], and the JavaFX 21 API Javadocs [16] are also available.

 

The JavaFX runtime is delivered as an SDK and as a set of jmods for each platform. You can use the SDK to compile and run JavaFX applications. You can use the jmods with jlink to create a JDK that includes the JavaFX modules, and optionally, your modular application. JavaFX 21 is designed to work with JDK 21, but it is known to work with JDK 17 and later versions.

 

In addition, the early access builds of the JavaFX 22 Runtime (builds 12) are also available [17]. They enable JavaFX application developers to build and test their applications with JavaFX 22 on JDK 22 EA.

 

[14] https://jdk.java.net/javafx21/

[15] https://github.com/openjdk/jfx/blob/jfx21/doc-files/release-notes-21.md

[16] https://download.java.net/java/GA/javafx21/69ca518c413e4df09f6be747a2400cf6/docs/api/index.html

[17] https://jdk.java.net/javafx22/

 

 

## JDK 22 Early-Access Builds

 

The latest Early-Access builds 20 (2023/10/19) are available [18], and are provided under the GNU General Public License v2, with the Classpath Exception. The Release Notes are available here [19].

 

Changes in recent JDK 22 builds (b12-b20) that may be of interest:

(Note that this is only a curated list of changes, make sure to check [20] for additional changes.)

 

- JDK-8306819: Consider disabling the compiler's default active annotation …

- JDK-8316691: Heap dump: separate stack traces for mounted virtual threads …

- JDK-8317603: Improve exception messages thrown by sun.nio.ch.Net native m…

- JDK-8312522: Implementation of Foreign Function & Memory API

- JDK-8296581: Better system proxy support

- JDK-8316994: Avoid modifying ClassLoader and Module objects during -Xshar…

- JDK-8316970: Add internal annotation to mark restricted methods

- JDK-8301686: TLS 1.3 handshake fails if server_name doesn't match resumin…

- JDK-8268622: Performance issues in javac Name class

- JDK-8317246: Cleanup java.net.URLEncoder and URLDecoder use of file.encod…

- JDK-8311084: Add typeSymbol() API for applicable constant pool entries

- JDK-8316229: Enhance class initialization logging

- JDK-8315771: [JVMCI] Resolution of bootstrap methods with int[] static arguments

- JDK-8316681: Rewrite URLEncoder.encode to use small reusable buffers

- JDK-8315810: Reimplement sun.reflect.ReflectionFactory::newConstructorForSerialization with method handles

- JDK-8296246: Update Unicode Data Files to Version 15.1.0

- JDK-8316160: Remove sun.misc.Unsafe.{shouldBeInitialized,ensureClassInitialized}

- JDK-8313452: Improve Classfile API attributes handling safety

- JDK-8314774: Optimize URLEncoder

- JDK-8246280: Refine API to model sealed classes and interfaces in javax.lang.model

- JDK-8314960: Add Certigna Root CA

- JDK-8306632: Add a JDK Property for specifying DTD support

- JDK-8315938: Deprecate for removal Unsafe methods that have standard APIs for many releases

- JDK-8041488: Locale-Dependent List Patterns

- JDK-8311939: Excessive allocation of Matcher.groups array

- JDK-8314569: (fs) Improve normalization of UnixPath for input with trailing slashes

- JDK-8314611: Provide more explicative error message parsing Currencies

- JDK-8315117: Update Zlib Data Compression Library to Version 1.3

- JDK-8313804: JDWP support for -Djava.net.preferIPv6Addresses=system

- JDK-8316681: Rewrite URLEncoder.encode to use small reusable buffers

 

[18] https://jdk.java.net/22/

[19] https://jdk.java.net/22/release-notes

[20] https://github.com/openjdk/jdk/compare/jdk-22%2B12...jdk-22%2B20

 

 

## New Jextract Early-Access Builds

 

Jextract mechanically generates Java bindings from native library headers. New Jextract EA builds are now available (Build 21-jextract+1-2 (2023/9/25)) [21], those EA builds are based on JDK 21 and are intended for expert users.

 

[21] https://jdk.java.net/jextract/

 

 

## Topics of Interest:

 

Java 21… and Beyond - Brian Goetz Devoxx 2023 Keynote

https://inside.java/2023/10/14/java-21-and-beyond/

 

JDK 21 Security Enhancements

https://seanjmullan.org/blog/2023/09/22/jdk21

 

With Java 21, Your Code Runs Even Faster but How is that Possible?

https://inside.java/2023/10/06/devoxx-your-code-runs-even-faster/

 

My Favorite JDK 21 Feature: Javadoc Search URL

https://stuartmarks.wordpress.com/2023/09/22/my-favorite-jdk-21-feature-javadoc-search-url/

 

Upgrading from Java 17 to 21 #RoadTo21

https://inside.java/2023/08/27/roadto21-upgrade/

 

Java 21 API Changes #RoadTo21

https://inside.java/2023/09/10/roadto21-api/

 

Java 21 Security #RoadTo21

https://inside.java/2023/09/13/roadto21-security/

 

Java 21 Tool Enhancements: Better Across the Board #RoadTo21

https://inside.java/2023/09/06/roadto21-performance/

 

Java 21 JVM and GC Improvements #RoadTo21

https://inside.java/2023/09/03/roadto21-performance/

               

Java 21 Brings Full Pattern Matching #RoadTo21

https://inside.java/2023/09/17/roadto21-pattern-matching/

 

Java 21 new feature: Virtual Threads #RoadTo21

https://inside.java/2023/08/30/roadto21-virtualthreads/

 

G1: Java's Default Garbage Collector

https://inside.java/2023/10/15/g1/

 

New candidate JEP: 457: Class-File API (Preview)

https://openjdk.org/jeps/457

 

Using JAXB in Custom Ant Tasks on Recent Java Versions

https://jaitechwriteups.blogspot.com/2023/10/using-jaxb-in-custom-ant-tasks-on.html

 

Java Records are "Trusted" and Consequently Faster

http://minborgsjavapot.blogspot.com/2023/09/java-records-are-trusted-and.html

 

JVMLS 2023 Keynote

https://inside.java/2023/09/14/jvmls-keynote/

 

JVMLS - Project Leyden

https://inside.java/2023/09/07/project-leyden/

 

JVMLS - Value Objects in Valhalla

https://inside.java/2023/09/05/value-objects-in-valhalla/

 

Complete JVMLS 2023 playlist

https://www.youtube.com/playlist?list=PLX8CzqL3ArzW90jKUCf4H6xCKpStxsOzp

 

Teaching Old Streams New Tricks

https://inside.java/2023/10/11/devoxx-teaching-old-streams-new-tricks/

 

Support Markdown in javadoc Comments

https://mail.openjdk.org/pipermail/javadoc-dev/2023-October/006455.html

 

Brian Goetz Answers Your Java Questions

https://inside.java/2023/10/20/ama-brian/

 

 

## October 2023 Critical Patch Update Released

 

As part of the October 2023 CPU, Oracle released OpenJDK 21.0.1, JDK 21.0.1, JDK 17.0.9 LTS, 11.0.21 LTS, 8u391, and 8u391-perf.

 

 

~

 

PS: Don't forget to update me about your plans related to Java 21.

 

Until next time!

 

 

--David


Back to the top