The Java Version Almanac
javaalmanac.io
Feedback on this page?

New APIs in Java 21

Comparing Java 21 (21-ea+6-365-open) with Java 19 (19.0.2+7-tem).

Element Modification
java.base
    java.io
      BufferedInputStream
        • - final
        • + sealed
        PushbackInputStream
          SequenceInputStream
            java.lang.constant
              ClassDesc
                java.lang.foreign
                  Addressable
                  • + abstract
                  • + abstract
                  • + abstract
                  asVariadic(MemoryLayout...)
                  • + abstract
                  • + abstract
                  equals(Object)
                  firstVariadicArgumentIndex()
                  hashCode()
                  • + abstract
                  • + abstract
                  toString()
                  • - extends AbstractLayout
                  • - final
                  • + abstract
                  • + extends Object
                  • + sealed
                  equals(Object)
                  hashCode()
                  isStruct()
                  isUnion()
                  • + abstract
                  toString()
                  • + abstract
                  • + abstract
                  Linker
                    downcallHandle(Addressable, FunctionDescriptor)
                    downcallHandle(FunctionDescriptor)
                    downcallType(FunctionDescriptor)
                    upcallStub(MethodHandle, FunctionDescriptor,...
                    upcallType(FunctionDescriptor)
                    MemoryAddress
                    MemoryLayout
                      isPadding()
                      paddingLayout(long)
                      structLayout(MemoryLayout...)
                      unionLayout(MemoryLayout...)
                      • - implements Addressable
                      address()
                      allocateNative(MemoryLayout, MemorySession)
                      allocateNative(long, MemorySession)
                      allocateNative(long, long, MemorySession)
                      get(ValueLayout.OfAddress, long)
                      getAtIndex(ValueLayout.OfAddress, long)
                      • - abstract
                      ofAddress(MemoryAddress, long, MemorySession)
                      session()
                      set(ValueLayout.OfAddress, long, Addressable)
                      setAtIndex(ValueLayout.OfAddress, long,...
                      MemorySession
                      SegmentAllocator
                        allocate(ValueLayout.OfAddress, Addressable)
                        implicitAllocator()
                        newNativeArena(MemorySession)
                        newNativeArena(long, MemorySession)
                        newNativeArena(long, long, MemorySession)
                        • - extends AbstractLayout
                        • - final
                        • + abstract
                        • + extends Object
                        • + sealed
                        • + abstract
                        • + abstract
                        equals(Object)
                        • + abstract
                        hashCode()
                        • + abstract
                        toString()
                        • + abstract
                        • + abstract
                        • + abstract
                        SymbolLookup
                          libraryLookup(Path, MemorySession)
                          libraryLookup(String, MemorySession)
                          lookup(String)
                          VaList.Builder
                            addVarg(ValueLayout.OfAddress, Addressable)
                            • - implements Addressable
                            address()
                            make(Consumer, MemorySession)
                            nextVarg(ValueLayout.OfAddress)
                            ofAddress(MemoryAddress, MemorySession)
                            session()
                            • - extends ValueLayout
                            • - final
                            • + abstract
                            • + extends Object
                            • + implements ValueLayout
                            • + sealed
                            • + abstract
                            • + abstract
                            • + abstract
                            • - extends ValueLayout
                            • - final
                            • + abstract
                            • + extends Object
                            • + implements ValueLayout
                            • + sealed
                            • + abstract
                            • + abstract
                            • + abstract
                            • - extends ValueLayout
                            • - final
                            • + abstract
                            • + extends Object
                            • + implements ValueLayout
                            • + sealed
                            • + abstract
                            • + abstract
                            • + abstract
                            • - extends ValueLayout
                            • - final
                            • + abstract
                            • + extends Object
                            • + implements ValueLayout
                            • + sealed
                            • + abstract
                            • + abstract
                            • + abstract
                            • - extends ValueLayout
                            • - final
                            • + abstract
                            • + extends Object
                            • + implements ValueLayout
                            • + sealed
                            • + abstract
                            • + abstract
                            • + abstract
                            • - extends ValueLayout
                            • - final
                            • + abstract
                            • + extends Object
                            • + implements ValueLayout
                            • + sealed
                            • + abstract
                            • + abstract
                            • + abstract
                            • - extends ValueLayout
                            • - final
                            • + abstract
                            • + extends Object
                            • + implements ValueLayout
                            • + sealed
                            • + abstract
                            • + abstract
                            • + abstract
                            • - extends ValueLayout
                            • - final
                            • + abstract
                            • + extends Object
                            • + implements ValueLayout
                            • + sealed
                            • + abstract
                            • + abstract
                            • + abstract
                            • - extends ValueLayout
                            • - final
                            • + abstract
                            • + extends Object
                            • + implements ValueLayout
                            • + sealed
                            • + abstract
                            • + abstract
                            • + abstract
                            • - extends AbstractLayout
                            • + abstract
                            • + extends Object
                            • + abstract
                            • + abstract
                            equals(Object)
                            hashCode()
                            • + abstract
                            toString()
                            • + abstract
                            • + abstract
                            • + abstract
                            java.lang.module
                              ModuleDescriptor.Exports
                                ModuleDescriptor.Opens
                                  ModuleDescriptor.Requires
                                    ModuleDescriptor
                                      java.lang.reflect
                                        Executable
                                          • + abstract
                                          Field
                                            Parameter
                                              Member
                                                java.lang
                                                  Character.UnicodeBlock
                                                    Class
                                                      Float
                                                        ModuleLayer.Controller
                                                          Module
                                                            • + deprecated
                                                            • + forRemoval
                                                            ThreadGroup
                                                              allowThreadSuspension(boolean)
                                                              Character.UnicodeScript
                                                                java.net
                                                                  URL
                                                                    • + deprecated
                                                                    • + deprecated
                                                                    • + deprecated
                                                                    • + deprecated
                                                                    • + deprecated
                                                                    • + deprecated
                                                                    java.nio.channels
                                                                      FileChannel
                                                                        map(FileChannel.MapMode, long, long,...
                                                                        java.nio.file.spi
                                                                          FileSystemProvider
                                                                            java.security.cert
                                                                              CertStore
                                                                                • - final
                                                                                java.security.interfaces
                                                                                  DSAKeyPairGenerator
                                                                                    • - throws InvalidParameterException
                                                                                    • - throws InvalidParameterException
                                                                                    java.security
                                                                                      InvalidParameterException
                                                                                        java.util.concurrent
                                                                                          ForkJoinPool
                                                                                            ForkJoinWorkerThread
                                                                                              java.util.regex
                                                                                                Matcher
                                                                                                  Pattern
                                                                                                    MatchResult
                                                                                                      java.util.zip
                                                                                                        ZipInputStream
                                                                                                          java.util
                                                                                                            IdentityHashMap
                                                                                                              javax.net.ssl
                                                                                                                SSLParameters
                                                                                                                  java.compiler
                                                                                                                    javax.lang.model.util
                                                                                                                      Elements
                                                                                                                        javax.lang.model
                                                                                                                          SourceVersion
                                                                                                                            java.desktop
                                                                                                                              javax.swing.plaf.synth
                                                                                                                                SynthComboBoxUI
                                                                                                                                  SynthPasswordFieldUI
                                                                                                                                    javax.swing.text
                                                                                                                                      DefaultEditorKit
                                                                                                                                        java.management
                                                                                                                                          javax.management.loading
                                                                                                                                            • + deprecated
                                                                                                                                            • + forRemoval
                                                                                                                                            • + deprecated
                                                                                                                                            • + forRemoval
                                                                                                                                            • + deprecated
                                                                                                                                            • + forRemoval
                                                                                                                                            • + deprecated
                                                                                                                                            • + forRemoval

                                                                                                                                            This report is based on simple comparison of all public and protected APIs of the java.* and javax.* packages of JDK builds 21-ea+6-365-open and 19.0.2+7-tem. It does not make statements about compatibility.

                                                                                                                                            For the latest Java versions the corresponding CSRs (Compatibility & Specification Review) are linked for a quick reference to find out about the reasoning of the change.

                                                                                                                                            More detailed API comparisons based on the japicmp tool can be found here.