27 December 2019

New Classes in Java 11

Java 11 is a LTS (Long Term Support) release, which means that it will get public updates till September 2022 and extended support until September 2026. While it is an important release, it does not add much to the platform, much like Java Update 10. Still Simon Ritter found 90 new features and APIs in JDK 11. Let's have a look at the new classes.

New HTTP Client
The Standard HTTP Client has been moved from jdk.incubator.http to java.net.http:
java.net.http.HttpClient
java.net.http.HttpClient$Builder
java.net.http.HttpClient$Redirect
java.net.http.HttpClient$Version
java.net.http.HttpConnectTimeoutException
java.net.http.HttpHeaders
java.net.http.HttpRequest
java.net.http.HttpRequest$BodyPublisher
java.net.http.HttpRequest$BodyPublishers
java.net.http.HttpRequest$Builder
java.net.http.HttpResponse
java.net.http.HttpResponse$BodyHandler
java.net.http.HttpResponse$BodyHandlers
java.net.http.HttpResponse$BodySubscriber
java.net.http.HttpResponse$BodySubscribers
java.net.http.HttpResponse$PushPromiseHandler
java.net.http.HttpResponse$ResponseInfo
java.net.http.HttpTimeoutException
java.net.http.WebSocket
java.net.http.WebSocket$Builder
java.net.http.WebSocket$Listener
java.net.http.WebSocketHandshakeException
Security
JEP 324: Key Agreement with Curve25519 and Curve448 comes with a few classes,
java.security.interfaces.XECKey
java.security.interfaces.XECPrivateKey
java.security.interfaces.XECPublicKey
java.security.spec.NamedParameterSpec
java.security.spec.XECPrivateKeySpec
java.security.spec.XECPublicKeySpec
as do the ChaCha20 and Poly1305 Cryptographic Algorithms: javax.crypto.spec.ChaCha20ParameterSpec.

Other Smaller Changes
There are around 20 other new classes including support for Dynamic Class-File Constants and the jaotc command.
java.lang.invoke.ConstantBootstraps

javax.print.attribute.standard.DialogOwner

jdk.nio.Channels
jdk.nio.Channels$SelectableChannelCloser

jdk.swing.interop.DispatcherWrapper
jdk.swing.interop.DragSourceContextWrapper
jdk.swing.interop.DropTargetContextWrapper
jdk.swing.interop.internal.InteropProviderImpl
jdk.swing.interop.LightweightContentWrapper
jdk.swing.interop.LightweightFrameWrapper
jdk.swing.interop.SwingInterOpUtils

jdk.tools.jaotc.aarch64.AArch64ELFMacroAssembler
jdk.tools.jaotc.aarch64.AArch64InstructionDecoder
jdk.tools.jaotc.binformat.elf.AArch64JELFRelocObject
jdk.tools.jaotc.binformat.elf.AMD64JELFRelocObject
Removal
Besides these few new classes, the real new thing in Java 11 is removal. The new Java drops much from the JDK. Really much: JavaFX is removed - it was just added in Java 8 and 9. Dropped packages are
javafx.* [8-10]
javafx.css [9-10]
javafx.css.converter [9-10]
javafx.fxml [9-10]
javafx.scene [9-10]
javafx.util [9-10]
Java EE and CORBA Modules are dropped:
javax.activation [6-10]
javax.activity [5-10]
javax.annotation [6-10]
javax.jnlp [5-10]
javax.jws [6-10]
javax.rmi.CORBA [3-10]
javax.security.auth.Policy [4-10]
javax.transaction [3-10]
javax.xml.bind [6-10]
javax.xml.soap [6-10]
javax.xml.ws [6-10]
jdk.management.cmm.SystemResourcePressureMXBean [8-10]
jdk.management.resource [8-10]
jdk.packager.services.singleton [only 10]
jdk.packager.services.userjvmoptions [9-10]
org.omg.CORBA [2-10]
Most of these classes have been added with Java 6, some even in the previous release (10).

List of all public classes
You can download the complete history of all public classes ever available in Java from version 1.0 to 11.0.2. Each class name is annotated with [release] showing the release it first appeared, e.g. java.lang.annotation.Annotation [5].

No comments: