New APIs in Java 21
Comparing Java 21 (21.0.9+10-LTS-tem) with Java 20 (20.0.2+9-tem).
| Element | Modification | 
|---|---|
| java.base | |
| java.io | |
| 
 | |
| java.lang.constant | |
| ConstantDescs | |
| ClassDesc | |
| MethodHandleDesc | |
| MethodTypeDesc | |
| 
 | |
| java.lang.foreign | |
| Arena | |
| isCloseableBy(Thread) | |
| openConfined() | |
| openShared() | |
| scope() | |
| GroupLayout | |
| withBitAlignment(long) | |
| Linker.Option.CaptureCallState | |
| Linker.Option | |
| captureCallState(String...) | |
| Linker | |
| 
 | |
| upcallStub(MethodHandle, FunctionDescriptor,... | |
| MemoryLayout.PathElement | |
| MemoryLayout | |
| bitAlignment() | |
| bitOffset(MemoryLayout.PathElement...) | |
| bitOffsetHandle(MemoryLayout.PathElement...) | |
| bitSize() | |
| 
 | |
| valueLayout(Class, ByteOrder) | |
| withBitAlignment(long) | |
| MemorySegment | |
| allocateNative(MemoryLayout, SegmentScope) | |
| allocateNative(long, SegmentScope) | |
| allocateNative(long, long, SegmentScope) | |
| array() | |
| 
 | |
| get(ValueLayout.OfAddress, long) | |
| getAtIndex(ValueLayout.OfAddress, long) | |
| ofAddress(long, long) | |
| ofAddress(long, long, SegmentScope) | |
| ofAddress(long, long, SegmentScope, Runnable) | |
| scope() | |
| set(ValueLayout.OfAddress, long, MemorySegment) | |
| setAtIndex(ValueLayout.OfAddress, long,... | |
| PaddingLayout | |
| withBitAlignment(long) | |
| SegmentAllocator | |
| allocate(ValueLayout.OfAddress, MemorySegment) | |
| nativeAllocator(SegmentScope) | |
| SegmentScope | |
| SequenceLayout | |
| withBitAlignment(long) | |
| StructLayout | |
| withBitAlignment(long) | |
| SymbolLookup | |
| libraryLookup(Path, SegmentScope) | |
| libraryLookup(String, SegmentScope) | |
| UnionLayout | |
| withBitAlignment(long) | |
| VaList.Builder | |
| VaList | |
| ValueLayout.OfAddress | |
| ValueLayout.OfBoolean | |
| withBitAlignment(long) | |
| ValueLayout.OfByte | |
| withBitAlignment(long) | |
| ValueLayout.OfChar | |
| withBitAlignment(long) | |
| ValueLayout.OfDouble | |
| withBitAlignment(long) | |
| ValueLayout.OfFloat | |
| withBitAlignment(long) | |
| ValueLayout.OfInt | |
| withBitAlignment(long) | |
| ValueLayout.OfLong | |
| withBitAlignment(long) | |
| ValueLayout.OfShort | |
| withBitAlignment(long) | |
| ValueLayout | |
| withBitAlignment(long) | |
| java.lang.invoke | |
| StringConcatFactory | |
| VarHandle | |
| 
 | |
| java.lang.reflect | |
| ClassFileFormatVersion | |
| java.lang.runtime | |
| 
 | |
| java.lang | |
| Character | |
| Class | |
| Compiler | |
| 
 | |
| Math | |
| StrictMath | |
| 
 | |
| 
 | |
| String | |
| ThreadGroup | |
| allowThreadSuspension(boolean) | |
| Thread | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| allowSetThreadLocals(boolean) | |
| 
 | |
| allowSetThreadLocals(boolean) | |
| 
 | |
| allowSetThreadLocals(boolean) | |
| java.nio.channels | |
| FileChannel | |
| map(FileChannel.MapMode, long, long, SegmentScope) | |
| java.security.cert | |
| CertStore | |
| 
 | |
| java.util.concurrent | |
| ConcurrentSkipListMap | |
| ConcurrentSkipListSet | |
| CopyOnWriteArrayList | |
| DelayQueue | |
| Executors | |
| 
 | |
| 
 | |
| java.util.regex | |
| Pattern | |
| java.util | |
| ArrayList | |
| 
 | |
| Collections | |
| 
 | |
| 
 | |
| LinkedList | |
| Locale | |
| TreeMap | |
| TreeSet | |
| 
 | |
| 
 | |
| NavigableMap | |
| NavigableSet | |
| 
 | |
| 
 | |
| javax.crypto | |
| javax.net.ssl | |
| KeyManagerFactory | |
| 
 | |
| TrustManagerFactory | |
| 
 | |
| java.compiler | |
| javax.lang.model.element | |
| TypeElement | |
| VariableElement | |
| javax.lang.model | |
| SourceVersion | |
| java.desktop | |
| javax.swing.plaf.synth | |
| SynthComboBoxUI | |
| SynthLookAndFeel | |
| 
 | |
| java.management.rmi | |
| javax.management.remote.rmi | |
| RMIIIOPServerImpl | |
| java.management | |
| javax.management.remote | |
| JMXConnector | |
| 
 | |
| java.net.http | |
| java.net.http | |
| 
 | |
| java.xml.crypto | |
| javax.xml.crypto.dsig | |
| SignatureMethod | |
  This report is based on simple comparison of all public and
  protected APIs of the Java SE packages of JDK builds
  21.0.9+10-LTS-tem and 20.0.2+9-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.