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

New APIs in Java 18

Comparing Java 18 (18.0.2.1+1-tem) with Java 17 (17.0.13+11-tem).

Element Modification
java.base
    java.io
      FileInputStream
        ObjectInputStream.GetField
          • + throws ClassNotFoundException
          PrintStream
            java.lang.invoke
              MethodHandle
                • + final
                java.lang.reflect
                  Method
                    • - throws IllegalArgumentException
                    java.lang
                      Enum
                        • + deprecated
                        • + forRemoval
                        Math
                          Object
                            • + forRemoval
                            Runtime
                              • + deprecated
                              • + deprecated
                              • + deprecated
                              • + deprecated
                              • + forRemoval
                              StrictMath
                                System
                                  • + deprecated
                                  • + forRemoval
                                  Thread
                                    • + forRemoval
                                    java.net.spi
                                      java.nio.charset
                                        Charset
                                          java.security
                                            KeyStoreSpi
                                              KeyStore
                                                java.time
                                                  Duration
                                                    java.util.concurrent
                                                      ThreadPoolExecutor
                                                        • + forRemoval
                                                        javax.crypto
                                                          DecapsulateException
                                                          • removed
                                                          KEM.Decapsulator
                                                          • removed
                                                          KEM.Encapsulated
                                                          • removed
                                                          KEM.Encapsulator
                                                          • removed
                                                          KEM
                                                          • removed
                                                          KEMSpi.DecapsulatorSpi
                                                          • removed
                                                          KEMSpi.EncapsulatorSpi
                                                          • removed
                                                          KEMSpi
                                                          • removed
                                                          javax.security.auth
                                                            Subject
                                                              • + deprecated
                                                              • + forRemoval
                                                              • + deprecated
                                                              • + forRemoval
                                                              java.compiler
                                                                javax.annotation.processing
                                                                  Messager
                                                                    javax.lang.model.element
                                                                      ExecutableElement
                                                                        javax.lang.model.util
                                                                          Elements
                                                                            javax.lang.model
                                                                              SourceVersion
                                                                                javax.tools
                                                                                  ForwardingJavaFileManager
                                                                                    DocumentationTool.Location
                                                                                      JavaFileManager
                                                                                        java.desktop
                                                                                          java.awt.color
                                                                                            ICC_Profile
                                                                                              finalize()
                                                                                              java.awt.image
                                                                                                ColorModel
                                                                                                  finalize()
                                                                                                  IndexColorModel
                                                                                                    finalize()
                                                                                                    java.awt
                                                                                                      Graphics
                                                                                                        • + forRemoval
                                                                                                        PrintJob
                                                                                                          • + forRemoval
                                                                                                          javax.imageio.spi
                                                                                                            ServiceRegistry
                                                                                                              • + forRemoval
                                                                                                              javax.imageio.stream
                                                                                                                FileCacheImageInputStream
                                                                                                                  • + forRemoval
                                                                                                                  FileImageInputStream
                                                                                                                    • + forRemoval
                                                                                                                    FileImageOutputStream
                                                                                                                      • + forRemoval
                                                                                                                      ImageInputStreamImpl
                                                                                                                        • + forRemoval
                                                                                                                        MemoryCacheImageInputStream
                                                                                                                          • + forRemoval
                                                                                                                          java.management
                                                                                                                            java.lang.management
                                                                                                                              MemoryMXBean
                                                                                                                                • + deprecated
                                                                                                                                java.net.http
                                                                                                                                  java.net.http
                                                                                                                                    HttpRequest.Builder
                                                                                                                                      java.xml
                                                                                                                                        javax.xml.xpath
                                                                                                                                          XPathFactory

                                                                                                                                            This report is based on simple comparison of all public and protected APIs of the java.* and javax.* packages of JDK builds 18.0.2.1+1-tem and 17.0.13+11-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.