Content deleted Content added
Isaidnoway (talk | contribs) Reverted 2 edits by 49.43.161.158 (talk): Rvt vand or test edits |
→Java SE 24: update. |
||
(44 intermediate revisions by 13 users not shown) | |||
Line 1:
{{Short description|List of versions of the Java programming language}}
{{About|the Java programming language||History of Java (disambiguation){{!}}History of Java}}
The [[Java (programming language)|Java language]] has undergone several changes since [[Java Development Kit|JDK]] 1.0 as well as numerous additions of [[class (computer science)|classes]] and packages to the standard [[library (computer science)|library]]. Since J2SE 1.4, the evolution of the Java language has been governed by the [[Java Community Process]] (JCP), which uses ''Java Specification Requests'' (JSRs) to propose and specify additions and changes to the [[Java (software platform)|Java platform]]. The language is specified by the ''Java Language Specification'' (JLS); changes to the JLS are managed under [http://www.jcp.org/en/jsr/detail?id=901 JSR 901]. In September 2017, Mark Reinhold, chief Architect of the Java Platform, proposed to change the release train to "one feature release every six months" rather than the then-current two-year schedule.<ref name="6monthsReinhold">{{cite web| title=Moving Java Forward Faster | last=Reinhold | first=Mark | url=https://mreinhold.org/blog/forward-faster | date=2017-09-06 | access-date=2017-09-16}}</ref><ref name="6monthsServerSide">{{cite web| title=Calling 'all aboard' on the six-month Java release train |publisher=theserverside.com | url=http://www.theserverside.com/news/450426185/Calling-all-aboard-on-the-six-month-Java-release-train | date=2017-09-12 | access-date=2017-09-16}}</ref> This proposal took effect for all following versions, and is still the current release schedule.
Line 7 ⟶ 6:
In addition to the language changes, other changes have been made to the [[Java Class Library]] over the years, which has grown from a few hundred classes in JDK 1.0 to over three thousand in J2SE 5. Entire new [[API]]s, such as [[Swing (Java)|Swing]] and [[Java2D]], have been introduced, and many of the original JDK 1.0 classes and methods have been [[deprecation|deprecated]], and very few APIs have been removed (at least one, for threading, in Java 22<ref name="removed_API_in Java_22" />). Some programs allow the conversion of Java programs from one version of the [[Java (software platform)|Java platform]] to an older one (for example Java 5.0 backported to 1.4) (see [[Java backporting tools]]).
Regarding Oracle's [[Java Platform, Standard Edition
|last=Smith| first=Donald|date=}}</ref>
In the case of [[OpenJDK]], both commercial long-term support and [[free software]] updates are available from multiple organizations in the broader [[OpenJDK#OpenJDK builds|community]].<ref name="OracleJava11LTS">{{cite web| title=What does LTS mean for OpenJDK? | last=Reinhold | first=Mark | url=https://mail.openjdk.java.net/pipermail/jdk-dev/2018-August/001824.html | date=2018-08-17 | access-date=2018-08-28}}</ref>
Java
== Release table ==
Line 192 ⟶ 157:
* Support for older Win9x versions dropped; unofficially, Java 6 Update 7 was the last release of Java shown to work on these versions of Windows.{{citation needed|date=April 2013}} This is believed{{by whom|date=November 2011}} to be due to the major changes in Update 10.
* Scripting Language Support ([[JSR 223]]): Generic API for tight integration with scripting languages, and built-in [[Mozilla]] [[JavaScript]] [[Rhino (JavaScript engine)|Rhino]] integration.
* Dramatic performance improvements for the core platform,<ref name="lobby">
* Improved Web Service support through [[JAX-WS]] ([[JSR 224]]).
* [[Java Database Connectivity|JDBC]] 4.0 support ([[JSR 221]]).
Line 381 ⟶ 346:
* [[Java virtual machine|JVM]] support for [[dynamic programming language|dynamic languages]], with the new <code>invokedynamic</code> bytecode under JSR-292,<ref name=JSR292>{{cite web|title=JSR 292: Supporting Dynamically Typed Languages on the Java Platform|url=https://jcp.org/en/jsr/detail?id=292|access-date=August 25, 2013}}</ref> following the prototyping work currently done on the [[Da Vinci Machine|Multi Language Virtual Machine]]
* Compressed 64-bit pointers<ref>{{cite web|title=Compressed oops in the Hotspot JVM|url=https://wikis.oracle.com/display/HotSpotInternals/CompressedOops|publisher=OpenJDK|access-date = 2012-08-01}}</ref> (available in Java 6 with <code>-XX:+UseCompressedOops</code>)<ref>{{cite web |url=https://www.oracle.com/technetwork/java/javase/tech/vmoptions-jsp-140102.html |title=Java HotSpot VM Options |publisher=Oracle |access-date=2013-04-11}}</ref>
*
:* Strings in [[switch statement|switch]]<ref>{{cite web|url=https://download.oracle.com/javase/7/docs/technotes/guides/language/strings-switch.html |title=Strings in switch Statements |publisher=Download.oracle.com |access-date=2013-01-15}}</ref>
:* Automatic resource management in try-statement aka ''try-with-resources statement''<ref>{{cite web|url=https://download.oracle.com/javase/7/docs/technotes/guides/language/try-with-resources.html |title=The try-with-resources Statement |publisher=Download.oracle.com |access-date=2013-01-15}}</ref>
Line 894 ⟶ 859:
|Java SE 8 Update 421<ref name=8u421>{{Cite web|title=Java SE Development Kit 8, Update 421 Release Notes|url=https://www.oracle.com/java/technologies/javase/8u421-relnotes.html|website=www.oracle.com}}</ref>
|2024-07-16
|
|-
|Java SE 8 Update 431<ref>{{Cite web |title=Java SE Development Kit 8, Update 431 Release Notes |url=https://www.oracle.com/java/technologies/javase/8u431-relnotes.html |website=www.oracle.com}}</ref>
|2024-10-15
|
|-
|}
Line 925 ⟶ 894:
At [[JavaOne]] 2011, Oracle discussed features they hoped to release for Java 9 in 2016.<ref>{{cite web | url=https://www.networkworld.com/article/938806/mark-your-calendar-java-9-finally-has-a-release-date.html | title=Mark your calendar: Java 9 finally has a release date| date=2015-05-07}}</ref> Java 9 should include better support for multi-gigabyte heaps, better native code integration, a different default [[garbage collector (computing)|garbage collector]] ([[Garbage-first collector|G1]], for "shorter response times")<ref>{{Cite web|url=https://jaxenter.com/java-9s-new-garbage-collector-whats-changing-whats-staying-118313.html|title=Java 9's new garbage collector: What's changing? What's staying?|date=June 26, 2015}}</ref> and a [[self-tuning]] JVM.<ref>{{cite web
| url = https://drdobbs.com/blogs/java/231900029
| title = JavaOne: JavaFX 2, Java on iOS}}</ref> In early 2016, the release of Java 9 was rescheduled for March 2017<ref>{{cite web | url=http://news.filehippo.com/2016/01/java-9-release-date-now-march-2017/ | title=Java 9 Release Date Now March 2017| date=2016-01-05}}</ref> and later again postponed four more months to July 2017.<ref>{{cite
=== Java 9 updates ===
Line 998 ⟶ 967:
* {{Java JEP|322|Time-Based Release Versioning}}
The first of these JEP 286 ''Local-Variable Type Inference'', allows the <code>var</code> keyword to be used for local variables with the actual type calculated by the compiler.
<syntaxhighlight lang="java">
var list = new ArrayList<String>(); // infers ArrayList<String>
Line 1,624 ⟶ 1,593:
</syntaxhighlight>
JEP 359 ''Records'' allows easy creation of simple immutable [[Tuple]]-like classes.<ref>{{cite
<syntaxhighlight lang="java">
Line 2,226 ⟶ 2,195:
}}
Java 21 was released on 19 September 2023.<ref name="JDK 21">{{Cite web |title=JDK 21 |url=https://openjdk.org/projects/jdk/21/ |access-date=June 12, 2023 |website=OpenJDK}}</ref>
# {{Java JEP|445|Unnamed Classes and Instance Main Methods (Preview)}} JEP 445, previewing unnamed classes, allows for a barebones Main class without boilerplate code:<syntaxhighlight lang="java" line="1">
Line 2,294 ⟶ 2,264:
|-
|Java SE 21.0.3<ref>{{Cite web|date=2024-04-16|title=JDK 21.0.3 Release Notes|url=https://www.oracle.com/java/technologies/javase/21-0-3-relnotes.html|website=oracle.com}}</ref>
|2024-
| '''''New features'''''
* Update XML Security for Java to 3.0.3 (<small>security-libs/javax.crypto</small>)
Line 2,319 ⟶ 2,289:
| lts = no
| jeps = 12
| public_support_ended = {{End date|2024|09}}
| features = Foreign function and memory API, unnamed variables and patterns
| previews = Structured concurrency, string templates
| incubating = Vector API
}}
Java 22 was released on March 19, 2024.<ref name="JDK 22">{{Cite web |title=JDK 22 |url=https://openjdk.org/projects/jdk/22/ |access-date=April 10, 2024 |website=OpenJDK}}</ref><ref>{{Cite web |title=Oracle Releases Java 22 |url=https://www.oracle.com/news/announcement/oracle-releases-java-22-2024-03-19/ |access-date=2024-03-20 |website=oracle.com}}</ref> The following features, or JEPs, were added with this release:
# {{Java JEP|423|Region Pinning for G1}}
# {{Java JEP|447|Statements before super(...) (Preview)}}
# {{Java JEP|454|Foreign Function & Memory API}}
# {{Java JEP|456|Unnamed Variables & Patterns}}
# {{Java JEP|457|Class-File API (Preview)}}
# {{Java JEP|458|Launch Multi-File Source-Code Programs}}
# {{Java JEP|459|String Templates (Second Preview)}}
# {{Java JEP|460|Vector API (Seventh Incubator)}}
# {{Java JEP|461|Stream Gatherers (Preview)}}
# {{Java JEP|462|Structured Concurrency (Second Preview)}}
# {{Java JEP|463|Implicitly Declared Classes and Instance Main Methods (Second Preview)}}
# {{Java JEP|464|Scoped Values (Second Preview)}}
An API related to Java's threading implementation, <code>java.lang.Thread.countStackFrames</code>, was removed.<ref name="removed_API_in Java_22">{{Cite web |title=Remove Thread.countStackFrames |url=https://bugs.openjdk.org/browse/JDK-8309196 |access-date=2024-04-16 |website=bugs.openjdk.org}}</ref><ref>{{Cite web |title=Java SE 22 (JSR 397) |url=https://cr.openjdk.org/~iris/se/22/latestSpec/#APIs-removed |access-date=2024-04-16 |website=cr.openjdk.org}}</ref>
{{clear}}
Line 2,349 ⟶ 2,318:
{{Infobox Java version
| version name = Java SE 23
| released = {{Start date and age|2024|9|17|br=yes|paren=yes}}
| jeps = 12
| features = Markdown documentation comments
| previews = Primitive types in Patterns, instanceof, and switch, Class-File API, Stream Gatherers, Module import declarations, Implicitly declared classes and instance main methods, structured concurrency, scoped values, flexible constructor bodies
| incubating = Vector API
|
}}
Java 23 was released on September 17, 2024,<ref>{{Cite web |title=Java SE 23 Platform JSR 398 |url=https://openjdk.org/projects/jdk/23/spec/ |access-date=2024-01-17 |website=openjdk.org}}</ref><ref>{{Cite web |title=JDK 23 |url=https://openjdk.org/projects/jdk/23/ |access-date=2024-08-28 |website=openjdk.org}}</ref><ref>{{Cite web |title=Oracle Releases Java 23 |url=https://www.oracle.com/news/announcement/oracle-releases-java-23-2024-09-17/ |access-date=2024-09-17 |website=oracle.com}}</ref> with the following JEPs:
# {{Java JEP|455|Primitive Types in Patterns, instanceof, and switch (Preview)}}
# {{Java JEP|466|Class-File API (Second Preview)}}
# {{Java JEP|467|Markdown Documentation Comments}}
# {{Java JEP|469|Vector API (Eighth Incubator)}}
# {{Java JEP|473|Stream Gatherers (Second Preview)}}
# {{Java JEP|471|Deprecate the Memory-Access Methods in sun.misc.Unsafe for Removal}}
# {{Java JEP|474|ZGC: Generational Mode by Default}}
# {{Java JEP|476|Module Import Declarations (Preview)}}
# {{Java JEP|477|Implicitly Declared Classes and Instance Main Methods (Third Preview)}}
# {{Java JEP|480|Structured Concurrency (Third Preview)}}
# {{Java JEP|481|Scoped Values (Third Preview)}}
# {{Java JEP|482|Flexible Constructor Bodies (Second Preview)}}
The String Templates preview feature was removed in Java 23 due to issues with the design of the feature.<ref>{{Cite mailing list |last=Bierman |first=Gavin |title=Update on String Templates (JEP 459) |mailing-list=Amber Expert Group |date=2024-04-05 |url=https://mail.openjdk.org/pipermail/amber-spec-experts/2024-April/004106.html |access-date=2024-09-25}}</ref>
{{clear}}
{{Anchor|Java 24}}
== Java SE 24 ==
{{Infobox Java version
| version name = Java SE 24
| released = {{Start date and age|2025|3|br=yes|paren=yes}}
| jeps = 24
| unreleased = yes
}}
The specification for Java 24 was finalized in December 2024, with 24 JEPs making it into the release and it being scheduled for release in March 2025.<ref>{{Cite web |title=Java SE 24 Platform JSR 399 |url=https://openjdk.org/projects/jdk/24/spec/ |access-date=2024-09-25 |website=openjdk.org}}</ref>
The following JEPs were targeted to this version of Java SE:<ref name="j24jeps">{{cite web |url=https://openjdk.org/projects/jdk/24/ |title=JDK 24 |website=OpenJDK |publisher=Oracle Corporation |access-date=November 9, 2024}}</ref>
# {{Java JEP|404|Generational Shenandoah (Experimental)}}
# {{Java JEP|450|Compact Object Headers (Experimental)}} (formerly known as ''[[#Future features|Project Lilliput]]'')
# {{Java JEP|472|Prepare to Restrict the Use of JNI}}
# {{Java JEP|475|Late Barrier Expansion for G1}}
# {{Java JEP|478|Key Derivation Function API (Preview)}}
# {{Java JEP|479|Remove the Windows 32-bit x86 Port}}
# {{Java JEP|483|Ahead-of-Time Class Loading & Linking}}
# {{Java JEP|484|Class-File API}}
# {{Java JEP|485|Stream Gatherers}}
# {{Java JEP|486|Permanently Disable the Security Manager}}
# {{Java JEP|487|Scoped Values (Fourth Preview)}}
# {{Java JEP|488|Primitive Types in Patterns, instanceof, and switch (Second Preview)}}
# {{Java JEP|489|Vector API (Ninth Incubator)}}
# {{Java JEP|490|ZGC: Remove the Non-Generational Mode}}
# {{Java JEP|491|Synchronize Virtual Threads without Pinning}}
# {{Java JEP|492|Flexible Constructor Bodies (Third Preview)}}
# {{Java JEP|493|Linking Run-Time Images without JMODs}}
# {{Java JEP|494|Module Import Declarations (Second Preview)}}
# {{Java JEP|495|Simple Source Files and Instance Main Methods (Fourth Preview)}}
# {{Java JEP|496|Quantum-Resistant Module-Lattice-Based Key Encapsulation Mechanism}}
# {{Java JEP|497|Quantum-Resistant Module-Lattice-Based Digital Signature Algorithm}}
# {{Java JEP|498|Warn upon Use of Memory-Access Methods in sun.misc.Unsafe}}
# {{Java JEP|499|Structured Concurrency (Fourth Preview)}}
# {{Java JEP|501|Deprecate the 32-bit x86 Port for Removal}}
{{Clear}}
{{Anchor|Java 25}}
== Java SE 25 ==
{{Infobox Java version
| version name = Java SE 25
| released = {{Start date and age|2025|9|br=yes|paren=yes}}
| jeps = 0
| unreleased = yes
}}
{{As of|2024|December}}, the specification for Java 25 has not yet been finalized. Java 25 is scheduled for release in September 2025.<ref>{{Cite web |title=Java SE 25 Platform JSR 400 |url=https://openjdk.org/projects/jdk/25/spec/ |access-date=2024-12-15 |website=openjdk.org}}</ref>
{{Clear}}
== Future features ==
|