How New Java Features are Released ?
Last updated
Was this helpful?
Last updated
Was this helpful?
New Java features are introduced through a structured and well-defined process to ensure they are robust, well-designed, and meet the needs of the Java community. This process involves multiple stages, from conception to standardization.
(JDK Enhancement Proposal): The introduction of a new feature usually begins with a JEP. A JEP is a document that describes the feature, its motivation, its design, and how it will be implemented. The JEP process ensures that every new feature is thoroughly considered and documented before development begins.
Community Input: The JEP is discussed within the Java community, including developers, experts, and stakeholders. This helps refine the idea and gather initial feedback.
Incubator Modules: For very experimental features or APIs, the Java platform may use incubator modules. These are meant for features that are not yet ready for even a preview release. Incubation allows for experimentation and feedback without committing to any particular design.
Feedback Collection: During this phase, developers can use the experimental feature and provide feedback on its design and usability.
First Preview: Once a feature is deemed stable enough, it may be released as a preview feature in a specific Java version. This means it is included in the JDK but is not yet part of the standard Java SE. Preview features need to be explicitly enabled by the developer using command-line flags.
Feedback and Refinement: Developers use the preview feature and provide feedback. The feature may undergo changes based on this feedback.
Subsequent Previews: If significant changes are needed, the feature may be released again as a second, third, etc., preview in subsequent Java versions. Each iteration allows for further refinement and testing.
Finalization: After one or more preview iterations, if the feature is considered stable and meets the necessary criteria, it is finalized. The design is frozen, and the feature is prepared for standardization.
Standardization: The feature is then included as a permanent part of the Java language or platform in a future release. It becomes part of the standard Java SE and is enabled by default.
Official Release: The finalized feature is included in an official Java release. It becomes available to all Java developers as part of the standard JDK.
Adoption: Developers start using the new feature in production environments. The Java community continues to provide feedback, which helps in identifying any remaining issues or areas for improvement.
Proposal and Drafting: Ensures new features are well-documented and thought out before development starts.
Incubation: Allows for experimental features to be tested and refined without commitment.
Preview Releases: Provides a feedback loop with the developer community, ensuring the feature meets real-world needs.
Finalization and Standardization: Ensures the feature is stable and robust before becoming part of the standard platform.
Release and Adoption: Encourages widespread use and further feedback to continue improving the feature.
Consider the introduction of the Pattern Matching for instanceof
feature:
JEP Creation: A JEP is created to propose pattern matching for the instanceof
operator, detailing its design and motivation.
Preview Release: The feature is included as a preview in Java 14, requiring a special flag to enable.
Feedback and Iteration: Based on developer feedback, the feature is refined and re-released as a second preview in Java 15 and then further refined in subsequent releases.
Finalization: After multiple iterations, the feature is finalized.
Standardization: The feature is included as a standard part of the Java language in a later release (e.g., Java 16 or 17).
This structured approach helps maintain the quality and stability of the Java platform while allowing it to evolve and incorporate new features that address the needs of its vast user base.