Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[jdt-dev] Java 24 early access - request for feedback

Dear All,

It's my pleasure to invite you all to test early access builds with support for the next version of Java!

Java 24 is scheduled for release on 18 March, 2025.

Prior to that release latest JDT builds from branches BETA_JAVA24 can be consumed for evaluation in two ways:

* Upgrade an existing installation >= 2025-03 M1 with the patch from
  https://download.eclipse.org/jdt/updates/4.35-P-builds/

* A fresh full Eclipse SDK can also be installed from
  https://download.eclipse.org/eclipse/downloads/drops4/Y20250207-1000
  Unfortunately these builds are not (yet?) listed on any overview page,
  but here's the corresponding composite update site:
  https://download.eclipse.org/eclipse/updates/4.35-Y-builds/


After installation you will be able to configure the compiler for compliance
"24 (BETA)" with this disclaimer:

    This is an implementation of an early-draft specification developed
    under the Java Community Process (JCP) and is made available for testing
    and evaluation purposes only. The code is not compatible with any
    specification of the JCP.


As always we appreciate reports about any new bugs you might find.

Additionally, I'd like to emphasize that the intention of "Preview Features" (like listed below) is to collect feedback from the Java community about the ongoing language design. I.e., if you are able to apply any preview features in a real-world setting, your experience (positive and negative) will be appreciated. For any such feedback I suggest to start a discussion in github, from where I will try to feed it into the corresponding expert group at openjdk.
=> please use https://github.com/eclipse-jdt/eclipse.jdt.core/discussions


A few words about what's in that version from the language p.o.v.:

* JEP 488: Primitive Types in Patterns, instanceof, and switch (Second Preview)

  This makes instanceof and switch more generally applicable, e.g.:
  * pattern matching on a record with nested patterns for record components
    of primitive types.
  * general pattern matching involving primitive types with any of
    - boxing / unboxing
    - primitive narrowing / widening

* JEP 492: Flexible Constructor Bodies (Third Preview)

  In current Java a constructor *must* invoke a super constructor before
  any other statements, with a strange loophole of a few things that are
  allowed to happen in the argument list of the super invocation.
  * from a language p.o.v. the JEP greatly cleans up what is/is not legal
  * pragmatically this feature allows coding patterns where fields are
    guaranteed to be initialized before the 'this' pointer can leak into
    code that assumes the object to be fully initialized.

* JEP 495: Implicitly Declared Classes and Instance Main Methods (Fourth Preview)

  This feature is targeted at teaching, to allow writing small programs
  without the heavy lifting of scaffolding which uses concept that should
  be taught at a later point in the course, i.e., programming without
  - packages / imports
  - class declaration
  - public static void main(String... args)

* JEP 494: Module Import Declarations (Second Preview)

  This can be seen as a spin-off of the previous: simplify import lists
  by bulk-importing all API of an entire module in just one line.
  (Implicitly declared classes implicitly import all of java.base)

Happy testing!
Stephan




Back to the top