Project Amber
The goal of Project Amber is to explore and incubate smaller, productivity-oriented Java language features that have been accepted as candidate JEPs in the OpenJDK JEP Process. This Project is sponsored by the Compiler Group.
Most Project Amber features go through at least two rounds of preview before becoming an official part of the Java Platform. For a given feature, there are separate JEPs for each round of preview and for final standardization.
Status of JEPs
Currently in progress:
- 495: Simple Source Files and Instance Main Methods (Fourth Preview)
- 494: Module Import Declarations (Second Preview)
- 492: Flexible Constructor Bodies (Third Preview)
- 488: Primitive Types in Patterns,
instanceof
, andswitch
(Second Preview) - 468: Derived Record Creation (Preview)
Delivered:
- 482: Flexible Constructor Bodies (Second Preview)
- 477: Implicitly Declared Classes and Instance
main
Methods (Third Preview) - 476: Module Import Declarations (Preview)
- 463: Implicitly Declared Classes and Instance
main
Methods (Second Preview) - 459: String Templates (Second Preview)
- 456: Unnamed Variables and Patterns
- 455: Primitive types in Patterns,
instanceof
, andswitch
(Preview) - 447: Statements before
super(…)
(Preview) - 445: Unnamed Classes and Instance
main
methods (Preview) - 443: Unnamed Patterns and Variables (Preview)
- 441: Pattern Matching for
switch
- 440: Record Patterns
- 433: Pattern Matching for
switch
(Fourth Preview) - 432: Record Patterns (Second Preview)
- 430: String Templates (Preview)
- 427: Pattern Matching for
switch
(Third Preview) - 420: Pattern Matching for
switch
(Second Preview) - 409: Sealed Classes
- 406: Pattern Matching for
switch
(Preview) - 405: Record Patterns (Preview)
- 395: Records
- 394: Pattern Matching for
instanceof
- 378: Text Blocks
- 361: Switch Expressions
- 323: Local-Variable Syntax for Lambda Parameters
- 286: Local-Variable Type Inference (
var
)
On hold:
- 301: Enhanced Enums (see here for explanation)
- 302: Lambda Leftovers
- 348: Java Compiler Intrinsics for JDK APIs
Withdrawn:
- 465: String Templates (Third Preview) (see here for explanation)
- 326: Raw String Literals, dropped in favor of Text Blocks (see here for explanation)
Documents
- Guides
- Local Variable Type Inference Style Guide (March 2018)
- Local Variable Type Inference FAQ (Oct 2018)
- Programmer’s Guide to Text Blocks (Aug 2019)
- Design notes
- Symbolic References for Constants (March 2018)
- Data Classes and Sealed Types for Java (February 2019)
- Towards Better Serialization (June 2019)
- Pattern matching
- Pattern Matching for Java (September 2018)
- Pattern Matching in the Java Object Model (December 2020)
- Pattern Matching for Java — Semantics (August 2020)
- Pattern Matching for Java — Runtime and Translation (June 2017)
- Extending
switch
for Pattern Matching (April 2017) - Type Patterns in
switch
(September 2020) - Patterns: Exhaustiveness, Unconditionality, and Remainder (May 2023)
- Towards Member Patterns (January 2024)
- String Tapas Redux: Beyond Mere String Interpolation (September 2021)
- Historical notes
- Data Classes for Java (October 2017)
- Data Classes for Java (February 2018)
Community
- Members
- Mailing Lists
- amber-dev — For technical discussion related to Project Amber
- amber-spec-experts — For Expert Group members only
- amber-spec-observers — A read-only clone of amber-spec-experts
- amber-spec-comments — For submitting comments on the official specs
- Other Resources