{"id":10021005,"date":"2025-09-17T21:18:19","date_gmt":"2025-09-17T13:18:19","guid":{"rendered":"https:\/\/itmax.cn\/?p=10021005"},"modified":"2025-09-17T21:18:19","modified_gmt":"2025-09-17T13:18:19","slug":"java25%e7%9a%84%e6%96%b0%e7%89%b9%e6%80%a7","status":"publish","type":"post","link":"https:\/\/itmax.cn\/?p=10021005","title":{"rendered":"Java25\u7684\u65b0\u7279\u6027"},"content":{"rendered":"<blockquote><p>Java\u8bed\u8a00\u7279\u6027\u7cfb\u5217<\/p><\/blockquote>\n<ul>\n<li><a href=\"https:\/\/segmentfault.com\/a\/1190000004417288\" target=\"_blank\" rel=\"noopener noreferrer\">Java5\u7684\u65b0\u7279\u6027<\/a><\/li>\n<li><a href=\"https:\/\/segmentfault.com\/a\/1190000004417536\" target=\"_blank\" rel=\"noopener noreferrer\">Java6\u7684\u65b0\u7279\u6027<\/a><\/li>\n<li><a href=\"https:\/\/segmentfault.com\/a\/1190000004417830\" target=\"_blank\" rel=\"noopener noreferrer\">Java7\u7684\u65b0\u7279\u6027<\/a><\/li>\n<li><a href=\"https:\/\/segmentfault.com\/a\/1190000004419611\" target=\"_blank\" rel=\"noopener noreferrer\">Java8\u7684\u65b0\u7279\u6027<\/a><\/li>\n<li><a href=\"https:\/\/link.segmentfault.com\/?enc=EPLe52tyTTQ7IwVadojFuA%3D%3D.NnmR%2FWRHP%2BKAme1IeJr8bt6ab4qPHpvm4sAUUElRgIkj%2BbtaPgzzJ6312Yam%2B%2BTlklKzkhTU%2FBrckxTbpj3T4Q%3D%3D\" rel=\"nofollow noopener noreferrer\" target=\"_blank\">Java9\u7684\u65b0\u7279\u6027<\/a><\/li>\n<li><a href=\"https:\/\/link.segmentfault.com\/?enc=TbTyoU%2FPr5rIrPi2ir5IXA%3D%3D.4txCy5Wme7xJONqNraa84MVAehh7fwov7iMBEF0d%2FGWab%2FiD9iFV09h5Z6OAeMR3Vxuyv3vCXtawVVMUkiQpkA%3D%3D\" rel=\"nofollow noopener noreferrer\" target=\"_blank\">Java10\u7684\u65b0\u7279\u6027<\/a><\/li>\n<li><a href=\"https:\/\/link.segmentfault.com\/?enc=QTvJ%2FzBHbPObm4wI2Zw1sQ%3D%3D.msXW%2FdPu6uBlQ1NyPDC1K7zcb0RFdBJHtWSbLOa4ljuJDfhKlqFA0Ny7GBcSitoUX1DUBitGA2U6lOzAj%2Fjx5A%3D%3D\" rel=\"nofollow noopener noreferrer\" target=\"_blank\">Java11\u7684\u65b0\u7279\u6027<\/a><\/li>\n<li><a href=\"https:\/\/link.segmentfault.com\/?enc=DxHjSf7zC2vknlzHCxS50w%3D%3D.Xhe%2BDlNwMvFX7gOHisyrULSxhVtoXCC0CC1j%2BQyjaEGRbGCzio7id2cR9TddSx1ZIK2t4a3MYDTfH7NqwVlkfg%3D%3D\" rel=\"nofollow noopener noreferrer\" target=\"_blank\">Java12\u7684\u65b0\u7279\u6027<\/a><\/li>\n<li><a href=\"https:\/\/link.segmentfault.com\/?enc=lN%2BhkHzzVEH%2B1ncEx%2BigLw%3D%3D.R6FmDpOOHomBzZzYQUE1eTD3p7FvNv5DXXU0cJJDf7hrSIEu3AEx%2F%2F1FPcy%2FlpTfMesN2fVS3vi2wqVMnNecBQ%3D%3D\" rel=\"nofollow noopener noreferrer\" target=\"_blank\">Java13\u7684\u65b0\u7279\u6027<\/a><\/li>\n<li><a href=\"https:\/\/link.segmentfault.com\/?enc=b9W0EQXzYlJwlXMPyn7Q3Q%3D%3D.XKUoFjkSTtFnreobgHs8jQRdZVIt5lwkm9eIdPra48yn44BztJag1xXAmIHnbx%2FRp%2BYATrYGt6zw6z96hFSxfw%3D%3D\" rel=\"nofollow noopener noreferrer\" target=\"_blank\">Java14\u7684\u65b0\u7279\u6027<\/a><\/li>\n<li><a href=\"https:\/\/link.segmentfault.com\/?enc=cBYnIU0Pbz7bOOTmj%2FNZng%3D%3D.obB0TNstXHPRvwzm1fyEY1kqTGEN1DP9zgeavHmsNAhOhEpVwsqZo2Gn3aZhoxlcd1zN3eBPSjK4ph15Fm%2Ffkg%3D%3D\" rel=\"nofollow noopener noreferrer\" target=\"_blank\">Java15\u7684\u65b0\u7279\u6027<\/a><\/li>\n<li><a href=\"https:\/\/link.segmentfault.com\/?enc=zSxM55jN6zk5N4w3EfZ33w%3D%3D.HAbDe9%2Fst9GyT74oq4Rw9Xl7AzGBhZG4GF%2FYAydeWYKad%2BPEDqkENKu9Ii9UeiNwMmupbnR%2Ba6rdnR0s4MaN%2Bw%3D%3D\" rel=\"nofollow noopener noreferrer\" target=\"_blank\">Java16\u7684\u65b0\u7279\u6027<\/a><\/li>\n<li><a href=\"https:\/\/link.segmentfault.com\/?enc=FDan%2BkoSoPufnkqaaKMvJA%3D%3D.cxq%2FotEQNbjDOmxXGRjKgZiR3LkJiLKS9E4KHO477K1OiKytejMbKo1wV5V1cz%2FsrToZWdOAebEQdPduUoZ0Dw%3D%3D\" rel=\"nofollow noopener noreferrer\" target=\"_blank\">Java17\u7684\u65b0\u7279\u6027<\/a><\/li>\n<li><a href=\"https:\/\/link.segmentfault.com\/?enc=VFuWys9yCxRMUncznRZOIw%3D%3D.7PnlXEq5%2Fllv8C4RXU3a8R5ZAI07KcXmSDMsXJYlQqiL8nGbTgMt8l2GdjCzmeBmbQJaYRoLL6xebvq1Yr9zzg%3D%3D\" rel=\"nofollow noopener noreferrer\" target=\"_blank\">Java18\u7684\u65b0\u7279\u6027<\/a><\/li>\n<li><a href=\"https:\/\/link.segmentfault.com\/?enc=xTazvc6ws2tuu%2BUFIeF7MQ%3D%3D.2OG2uZlrV7O%2F1A8tazv%2FVEdXaBq5qrh%2B%2BLhu4%2F9bGBEsbJLryiQ51pBrxork7pfEj0JOZuIJkrO7R0uHZZ7DnA%3D%3D\" rel=\"nofollow noopener noreferrer\" target=\"_blank\">Java19\u7684\u65b0\u7279\u6027<\/a><\/li>\n<li><a href=\"https:\/\/link.segmentfault.com\/?enc=1rYInyUMHbd3xjRP9X%2BpSQ%3D%3D.kNjMZN1nwUI7VBHvY9o%2FuhY1NyYHPdqYt0voDggeypV9IEjDZmZTaUhxpxBvafrPWu73oq5BUktUjQ%2Bdik8XCQ%3D%3D\" rel=\"nofollow noopener noreferrer\" target=\"_blank\">Java20\u7684\u65b0\u7279\u6027<\/a><\/li>\n<li><a href=\"https:\/\/link.segmentfault.com\/?enc=pE3RVMVs5dlQ8NyJw6dwWw%3D%3D.zey1uXyzgTFRsmB%2FOvmhqRoYMkQpMG0zxY3QcxPbgX%2FtLV19supTRZQirCIU9USGNy9mfBkFz6dzHXN%2BQJ9eVA%3D%3D\" rel=\"nofollow noopener noreferrer\" target=\"_blank\">Java21\u7684\u65b0\u7279\u6027<\/a><\/li>\n<li><a href=\"https:\/\/link.segmentfault.com\/?enc=NGtOsr%2F2%2BLgkoutMOBkmiA%3D%3D.5D%2F5uKduV62LUjSSJMChQPHB14wPUflTqHvqNt1LacV3qLERH5OqvG5KtkQ%2FtnjEOPTI5t%2F7ADivTeonMFbPlA%3D%3D\" rel=\"nofollow noopener noreferrer\" target=\"_blank\">Java22\u7684\u65b0\u7279\u6027<\/a><\/li>\n<li><a href=\"https:\/\/link.segmentfault.com\/?enc=S6R4RCLZby5OdR4qIfkDeA%3D%3D.U24TWdyYEnZDj%2FpddXeksxFA7JYBLZ7TlLcKw77pyLwWNHooA1%2FLFL%2BuYQyL%2B9%2FF%2Fu%2F2ciqBmvOLuuXUUmcPgw%3D%3D\" rel=\"nofollow noopener noreferrer\" target=\"_blank\">Java23\u7684\u65b0\u7279\u6027<\/a><\/li>\n<li><a href=\"https:\/\/link.segmentfault.com\/?enc=UPR1voynPu%2B2jaXEtk%2FMuw%3D%3D.xHgsktC4RwOAnHoH9GJufo%2Bpc%2FOXtHWEsuvHmTevzkDTfkQAhyfKRPHjfJu82U7IvhQxNxdcxC9vdVLduQc3jw%3D%3D\" rel=\"nofollow noopener noreferrer\" target=\"_blank\">Java24\u7684\u65b0\u7279\u6027<\/a><\/li>\n<li><a href=\"https:\/\/link.segmentfault.com\/?enc=mkCOPvN7dglXKshxHbGJow%3D%3D.2UWgI1PqmUQqzRHCq37vW8rk67VzR5T4iCSBf%2BvRZW2AsaL0Nmdl%2F%2F90zAbzkmDpHAfgSGxEYXBvXvSvVL2sJg%3D%3D\" rel=\"nofollow noopener noreferrer\" target=\"_blank\">Java25\u7684\u65b0\u7279\u6027<\/a><\/li>\n<li><a href=\"https:\/\/segmentfault.com\/a\/19c087577fc417f6646be5fbd275bda021\" target=\"_blank\" rel=\"noopener noreferrer\">Java26\u7684\u65b0\u7279\u6027<\/a><\/li>\n<\/ul>\n<h2>\u5e8f<\/h2>\n<p>\u672c\u6587\u4e3b\u8981\u8bb2\u8ff0\u4e00\u4e0bJava25\u7684\u65b0\u7279\u6027<\/p>\n<h2>\u7248\u672c\u53f7<\/h2>\n<pre><code>openjdk version &quot;25&quot; 2025-09-16\nOpenJDK Runtime Environment (build 25+36-3489)\nOpenJDK 64-Bit Server VM (build 25+36-3489, mixed mode, sharing)<\/code><\/pre>\n<blockquote><p>\u4eceversion\u4fe1\u606f\u53ef\u4ee5\u770b\u51fa\u662fbuild 25+36<\/p><\/blockquote>\n<h2>\u7279\u6027\u5217\u8868<\/h2>\n<h3><a href=\"https:\/\/link.segmentfault.com\/?enc=n%2FHxx8Dcz6sMGqNx5aJ8cw%3D%3D.ui57E4cB%2B3NdxYhfT5ph%2F%2FOen%2BDZNKPCyUMEkxtbzTk%3D\" rel=\"nofollow noopener noreferrer\" target=\"_blank\">JEP 470: PEM Encodings of Cryptographic Objects (Preview)<\/a><\/h3>\n<p>\u672c\u7279\u6027\u4e3aJava\u5e73\u53f0\u5f15\u5165\u4e86\u4e00\u5957\u7b80\u6d01\u3001\u6613\u7528\u4e14\u7ebf\u7a0b\u5b89\u5168\u7684API(Preview\u7248\u672c)\uff0c\u7528\u4e8e\u5728 PEM\uff08Privacy-Enhanced Mail\uff09\u6587\u672c\u4e0e\u5404\u7c7b\u5bc6\u7801\u5b66\u5bf9\u8c61\uff08\u5bc6\u94a5\u3001\u8bc1\u4e66\u3001CRL \u7b49\uff09\u4e4b\u95f4\u8fdb\u884c\u53cc\u5411\u8f6c\u6362\uff0c\u89e3\u51b3\u5f00\u53d1\u8005\u957f\u671f\u9700\u8981\u624b\u5199\u89e3\u6790\/\u683c\u5f0f\u5316\u903b\u8f91\u7684\u75db\u70b9\u3002<\/p>\n<ul>\n<li>DEREncodable \u6807\u8bb0\u63a5\u53e3<br \/>\u7edf\u4e00\u6807\u8bc6\u53ef\u53c2\u4e0e PEM \u7f16\u89e3\u7801\u7684\u5df2\u6709\u7c7b\u578b\uff1a<br \/>AsymmetricKey\u3001X509Certificate\u3001X509CRL\u3001KeyPair\u3001EncryptedPrivateKeyInfo\u3001PKCS8EncodedKeySpec\u3001X509EncodedKeySpec \u4ee5\u53ca\u65b0\u5f15\u5165\u7684 PEMRecord\u3002<\/li>\n<li>PEMEncoder \/ PEMDecoder<br \/>\u4e0d\u53ef\u53d8\u3001\u53ef\u590d\u7528\u3001\u7ebf\u7a0b\u5b89\u5168\u3002<br \/>\u652f\u6301\u76f4\u63a5\u7f16\u89e3\u7801\u5b57\u7b26\u4e32\u6216\u5b57\u8282\u6d41\uff0c\u63d0\u4f9b encode(DerEncodable) \/ decode(String\/InputStream) \u7b49\u4fbf\u6377\u65b9\u6cd5\u3002<br \/>\u901a\u8fc7 withEncryption(char[] password) \/ withDecryption(&#8230;) \u4e00\u952e\u52a0\u89e3\u5bc6\u79c1\u94a5\uff1b\u9ed8\u8ba4\u7b97\u6cd5\u53ef\u5728\u5b89\u5168\u5c5e\u6027\u6587\u4ef6\u4e2d\u914d\u7f6e\uff08\u5f53\u524d\u4e3a PBEWithHmacSHA256AndAES_128\uff09\u3002<br \/>\u901a\u8fc7 withFactory(Provider) \u53ef\u6307\u5b9a\u7279\u5b9a\u52a0\u5bc6\u63d0\u4f9b\u8005\u3002<\/li>\n<li>PEMRecord \u8bb0\u5f55\u7c7b<br \/>\u7528\u4e8e\u5904\u7406\u5e73\u53f0\u6682\u65e0\u5bf9\u5e94 API \u7684 PEM \u7c7b\u578b\uff08\u5982 PKCS#10 \u8bf7\u6c42\uff09\u6216\u9700\u8981\u4fdd\u7559 PEM \u9996\u90e8\u524d\u5bfc\u6570\u636e\u7684\u573a\u666f\u3002<\/li>\n<li>EncryptedPrivateKeyInfo \u589e\u5f3a<br \/>\u65b0\u589e\u9759\u6001\u5de5\u5382\u65b9\u6cd5 encryptKey(&#8230;) \u4e0e\u5b9e\u4f8b\u65b9\u6cd5 getKey(&#8230;)\uff0c\u65b9\u4fbf\u5148\u52a0\u5bc6\u6210 EncryptedPrivateKeyInfo \u518d\u7f16\u7801\u4e3a PEM\uff0c\u6216\u89e3\u7801\u540e\u76f4\u63a5\u89e3\u5bc6\u62ff\u5230 PrivateKey\u3002<\/li>\n<\/ul>\n<p>\u4f7f\u7528\u793a\u4f8b<\/p>\n<pre><code>public class PEMEncoding {\n    public static void main() throws NoSuchAlgorithmException {\n        \/\/ Enable preview features: --enable-preview --release 25\n\n        \/\/ 1. Generate an EC key pair\n        KeyPairGenerator keyPairGenerator = KeyPairGenerator.getInstance(&quot;EC&quot;);\n        KeyPair keyPair = keyPairGenerator.generateKeyPair();\n\n        \/\/ 2. Encode public key to PEM\n        String publicKeyPEM = PEMEncoder.of()\n                .encodeToString(keyPair.getPublic());\n        System.out.println(&quot;Public Key PEM:\/n&quot; + publicKeyPEM);\n\n        \/\/ 3. Encode a private key to encrypted PEM\n        char[] password = &quot;secret&quot;.toCharArray();\n        String privateKeyPEM = PEMEncoder.of()\n                .withEncryption(password)\n                .encodeToString(keyPair.getPrivate());\n        System.out.println(&quot;Encrypted Private Key PEM:\/n&quot; + privateKeyPEM);\n\n        \/\/ 4. Decode a public key\n        PublicKey decodedPubKey = PEMDecoder.of()\n                .decode(publicKeyPEM, PublicKey.class);\n        System.out.println(&quot;Decoded Public Key Algo: &quot; + decodedPubKey.getAlgorithm());\n\n        \/\/ 5. Decode encrypted private key\n        PrivateKey decodedPrivateKey = PEMDecoder.of()\n                .withDecryption(password)\n                .decode(privateKeyPEM, PrivateKey.class);\n        System.out.println(&quot;Decoded Private Key Algo: &quot; + decodedPrivateKey.getAlgorithm());\n    }\n}<\/code><\/pre>\n<p>\u7f16\u8bd1\u53ca\u8fd0\u884c<\/p>\n<pre><code>javac --release 25 --enable-preview PEMEncoding.java\njava  --enable-preview PEMEncoding<\/code><\/pre>\n<h3><a href=\"https:\/\/link.segmentfault.com\/?enc=Xch8brn0Dejntuu5M07Zew%3D%3D.Z0vVpKzN7nWKDdl3qNgRP3AjrI1jsPI1sUXy88uK%2Fp4%3D\" rel=\"nofollow noopener noreferrer\" target=\"_blank\">JEP 502: Stable Values (Preview)<\/a><\/h3>\n<p>\u672c\u7279\u6027\u5f15\u5165\u4e86\u4e00\u79cd\u540d\u4e3a Stable Values\uff08\u7a33\u5b9a\u503c\uff09 \u7684 API\uff0c\u7528\u4e8e\u652f\u6301\u5ef6\u8fdf\u521d\u59cb\u5316\u7684\u4e0d\u53ef\u53d8\u6570\u636e\u6301\u6709\u8005\u5bf9\u8c61\u3002\u8fd9\u4e00\u7279\u6027\u5728 JDK 25 \u4e2d\u4ee5\u9884\u89c8\u529f\u80fd\u5f62\u5f0f\u63d0\u4f9b\uff0c\u65e8\u5728\u63d0\u5347 Java \u5e94\u7528\u7684\u542f\u52a8\u6027\u80fd\u4e0e\u5e76\u53d1\u5b89\u5168\u6027\uff0c\u540c\u65f6\u4fdd\u7559 final \u5b57\u6bb5\u7684\u4f18\u5316\u80fd\u529b\uff08\u5982\u5e38\u91cf\u6298\u53e0\uff09\u3002 Stable Values\u586b\u8865\u4e86final\u5b57\u6bb5\u4e0e\u53ef\u53d8\u5b57\u6bb5\u4e4b\u95f4\u7684\u7a7a\u767d\uff0c\u5728\u4fdd\u6301\u4e0d\u53ef\u53d8\u6027\u548c\u7ebf\u7a0b\u5b89\u5168\u7684\u540c\u65f6\uff0c\u652f\u6301\u6309\u9700\u521d\u59cb\u5316\uff0c\u7279\u522b\u9002\u7528\u4e8e\u542f\u52a8\u65f6\u9700\u8981\u5ef6\u8fdf\u52a0\u8f7d\u8d44\u6e90\u7684\u5927\u578b\u5e94\u7528\u573a\u666f\u3002<\/p>\n<p>\u4f7f\u7528\u793a\u4f8b\u5982\u4e0b\uff1a<\/p>\n<pre><code>class OrderController {\n\n    \/\/ OLD:\n    \/\/ private Logger logger = null;\n\n    \/\/ NEW:\n    private final StableValue&lt;Logger&gt; logger = StableValue.of();\n\n    Logger getLogger() {\n        return logger.orElseSet(() -&gt; Logger.create(OrderController.class));\n    }\n\n    void submitOrder(User user, List&lt;Product&gt; products) {\n        getLogger().info(&quot;order started&quot;);\n        ...\n        getLogger().info(&quot;order submitted&quot;);\n    }\n\n}<\/code><\/pre>\n<p>\u7531\u4e8e\u662f\u9884\u89c8\u7248\u672c\uff0c\u6240\u4ee5\u9700\u8981<code>--enable-preview<\/code>\u542f\u7528<\/p>\n<pre><code>javac --release 25 --enable-preview Main.java\njava --enable-preview Main<\/code><\/pre>\n<h3><a href=\"https:\/\/link.segmentfault.com\/?enc=QWoTh4AoZw7gUoBsf9%2Bg8g%3D%3D.dE2YzJvbsPDgczMsJczXmuHLpWbG%2FQgTC0DP61GXK8Y%3D\" rel=\"nofollow noopener noreferrer\" target=\"_blank\">JEP 503: Remove the 32-bit x86 Port<\/a><\/h3>\n<p>\u5728JDK21\u7684<a href=\"https:\/\/link.segmentfault.com\/?enc=I8Unmj15BVD0DLJOUloKUw%3D%3D.iGbc8uid%2F%2FYPM0rytG6oCOvMW91mbr3TUaXBIAP05j8%3D\" rel=\"nofollow noopener noreferrer\" target=\"_blank\">JEP 449: Deprecate the Windows 32-bit x86 Port for Removal<\/a>\u5df2\u7ecf\u5e9f\u5f03\u4e86\u5bf9Windows 32\u4f4d x86\u7684\u79fb\u690d<br \/>\u5728JDK24\u7684<a href=\"https:\/\/link.segmentfault.com\/?enc=neFfHjIjB1XQcelhDYLs6g%3D%3D.PLkrZXtM280EGmhYvp%2BkyQ2x%2F18RRcAcQ4SRzTWU5uI%3D\" rel=\"nofollow noopener noreferrer\" target=\"_blank\">JEP 479: Remove the Windows 32-bit x86 Port<\/a>\u5220\u9664\u4e86\u76f8\u5173\u6e90\u4ee3\u7801\u3001\u79fb\u9664\u4e86\u5bf9windows 32\u4f4d\u76f8\u5173\u6784\u5efa\u652f\u6301<br \/>\u5728JDK24\u7684<a href=\"https:\/\/link.segmentfault.com\/?enc=2%2FH3fsackCH186tYzaCvNw%3D%3D.TLjKMU8DYgGf3FDB60uSg%2FjKlCs5OtDP4CInFNBZVVg%3D\" rel=\"nofollow noopener noreferrer\" target=\"_blank\">JEP 501: Deprecate the 32-bit x86 Port for Removal<\/a>\u5e9f\u5f03\u4e86\u5bf932\u4f4dx86\u7684\u79fb\u690d\uff0c\u4f46\u662f\u53ef\u4ee5\u901a\u8fc7<code>--enable-deprecated-ports=yes<\/code>\u6765\u542f\u7528\u6784\u5efa<br \/>\u5728JDK25Z\u5219\u5220\u9664\u4e86\u76f8\u5173\u6e90\u4ee3\u7801\u3001\u79fb\u9664\u4e86\u76f8\u5173\u6784\u5efa\u652f\u6301<\/p>\n<h3><a href=\"https:\/\/link.segmentfault.com\/?enc=1C%2F5zhlfHoo7utDgLFeq2w%3D%3D.tmGL%2BtFU4paLiELr%2Bw0x4UzXrQ6mrTdsZROh9d9YcFA%3D\" rel=\"nofollow noopener noreferrer\" target=\"_blank\">JEP 505: Structured Concurrency (Fifth Preview)<\/a><\/h3>\n<blockquote><p>JDK19\u7684<a href=\"https:\/\/link.segmentfault.com\/?enc=dmZdYyZ07YqUqY2WEyt9dQ%3D%3D.%2FtRFb87VYnftPnAiB%2FCEhcI0cWDpfml%2F7EwNLFvIlUQ%3D\" rel=\"nofollow noopener noreferrer\" target=\"_blank\">JEP 428: Structured Concurrency (Incubator)<\/a>\u4f5c\u4e3a\u7b2c\u4e00\u6b21incubator<br \/>JDK20\u7684<a href=\"https:\/\/link.segmentfault.com\/?enc=VrIqV%2B0An2%2BCODGRl7xb1g%3D%3D.VTQheIrp%2BhgpO6t1aM7kCwT4ULpH8GFza4dcUafFqtI%3D\" rel=\"nofollow noopener noreferrer\" target=\"_blank\">JEP 437: Structured Concurrency (Second Incubator)<\/a>\u4f5c\u4e3a\u7b2c\u4e8c\u6b21incubator<br \/>JDK21\u7684<a href=\"https:\/\/link.segmentfault.com\/?enc=bHgLTufesrbITvw4r7aETg%3D%3D.A3tD096kHYn8bW7r3hJmA%2FNOmvBzYV0t2DjZsBzQE48%3D\" rel=\"nofollow noopener noreferrer\" target=\"_blank\">JEP 453: Structured Concurrency (Preview)<\/a>\u4f5c\u4e3a\u9996\u6b21preview<br \/>JDK22\u7684<a href=\"https:\/\/link.segmentfault.com\/?enc=B9ZEoRHYfFg0oMJOfuGBCg%3D%3D.BtS5ah0bisLQ5ZGoIBRZs8Gw24Hg0%2BHWWNZPnLJ0Ku8%3D\" rel=\"nofollow noopener noreferrer\" target=\"_blank\">JEP 462: Structured Concurrency (Second Preview)<\/a>\u4f5c\u4e3a\u7b2c\u4e8c\u6b21preview<br \/>JDK23\u7684<a href=\"https:\/\/link.segmentfault.com\/?enc=bKmtGno8pGycXFkCS1O43g%3D%3D.Jjk4C%2F%2FgvRqGTqbtrUraaYdb35rUqHvYS4%2FOaegVyQo%3D\" rel=\"nofollow noopener noreferrer\" target=\"_blank\">JEP 480: Structured Concurrency (Third Preview)<\/a>\u4f5c\u4e3a\u7b2c\u4e09\u6b21preview<br \/>JDK24\u7684<a href=\"https:\/\/link.segmentfault.com\/?enc=tric5e9oymHYsN9nu0GxHQ%3D%3D.e%2FMMUw2WGwYN4MH0NrkC8O%2Fg8PdVOQGjztyMJ7kuMxo%3D\" rel=\"nofollow noopener noreferrer\" target=\"_blank\">JEP 499: Structured Concurrency (Fourth Preview)<\/a>\u4f5c\u4e3a\u7b2c\u56db\u6b21preview<br \/>JDK25\u4f5c\u4e3a\u7b2c\u4e94\u6b21preview<\/p><\/blockquote>\n<p>\u4f7f\u7528\u793a\u4f8b\u5982\u4e0b:<\/p>\n<pre><code>Response handle() throws InterruptedException {\n\n    try (var scope = StructuredTaskScope.open()) {\n\n        Subtask&lt;String&gt; user = scope.fork(() -&gt; findUser());\n        Subtask&lt;Integer&gt; order = scope.fork(() -&gt; fetchOrder());\n\n        scope.join();   \/\/ Join subtasks, propagating exceptions\n\n        \/\/ Both subtasks have succeeded, so compose their results\n        return new Response(user.get(), order.get());\n\n    }\n\n}<\/code><\/pre>\n<h3><a href=\"https:\/\/link.segmentfault.com\/?enc=4050Wf0yMHWtVe4a2Z9byQ%3D%3D.kTOBtZLY%2FK7XRaDtZQ1SriVMEKLLCE%2FA%2BgEYmd%2BvKec%3D\" rel=\"nofollow noopener noreferrer\" target=\"_blank\">JEP 506: Scoped Values<\/a><\/h3>\n<p>JDK19\u7684<a href=\"https:\/\/link.segmentfault.com\/?enc=G9n%2FJw7uEXYZy12oopyziA%3D%3D.OTnsYGUGgChrBVOIiIOsTvbWSMkKKxfMozHVfaDpKCE%3D\" rel=\"nofollow noopener noreferrer\" target=\"_blank\">JEP 428: Structured Concurrency (Incubator)<\/a>\u4f5c\u4e3a\u7b2c\u4e00\u6b21incubator<br \/>JDK20\u7684<a href=\"https:\/\/link.segmentfault.com\/?enc=mFe5sDBxAoO%2BOVBtP72Naw%3D%3D.vmOpVa87Q%2BiESKu5PNMMqoRDMjIjsGYFva0DgSl0txI%3D\" rel=\"nofollow noopener noreferrer\" target=\"_blank\">JEP 437: Structured Concurrency (Second Incubator)<\/a>\u4f5c\u4e3a\u7b2c\u4e8c\u6b21incubator<br \/>JDK21\u7684<a href=\"https:\/\/link.segmentfault.com\/?enc=y2RAUdmhv88tFXbfIZdZag%3D%3D.qYTL%2FxM5ndXB6sCHnqPZ0LMM0d25omtsCiybDDa686c%3D\" rel=\"nofollow noopener noreferrer\" target=\"_blank\">JEP 453: Structured Concurrency (Preview)<\/a>\u4f5c\u4e3a\u9996\u6b21preview<br \/>JDK22\u7684<a href=\"https:\/\/link.segmentfault.com\/?enc=nzPpZM96EnSgqsf9Xpu2gg%3D%3D.y7%2FQgvptwtzN%2ByEjYPlfbGvJMeQcQ0235Hy1VQr3xc8%3D\" rel=\"nofollow noopener noreferrer\" target=\"_blank\">JEP 462: Structured Concurrency (Second Preview)<\/a>\u4f5c\u4e3a\u7b2c\u4e8c\u6b21preview<br \/>JDK23\u7684<a href=\"https:\/\/link.segmentfault.com\/?enc=QFUGkkAuyTfmD7Bc2FWlIg%3D%3D.252WEzAFu4%2BE0YV15om2BeQPrXZCORc1juGzL48ZdQA%3D\" rel=\"nofollow noopener noreferrer\" target=\"_blank\">JEP 480: Structured Concurrency (Third Preview)<\/a>\u4f5c\u4e3a\u7b2c\u4e09\u6b21preview<br \/>JDK24\u7684<a href=\"https:\/\/link.segmentfault.com\/?enc=xWxxLX%2FGWu8bT5RxCET3AA%3D%3D.7MpGpWHZoJHDdoK2cxJQKOfG%2FfnidIE6vtKyZRTH%2BQI%3D\" rel=\"nofollow noopener noreferrer\" target=\"_blank\">JEP 487: Scoped Values (Fourth Preview)<\/a>\u4f5c\u4e3a\u7b2c\u56db\u6b21preview\uff0c\u4e0eJDK23\u4e0d\u540c\u7684\u662fcallWhere\u4ee5\u53carunWhere\u65b9\u6cd5\u4eceScopedValue\u7c7b\u4e2d\u79fb\u9664\uff0c\u53ef\u4ee5\u4f7f\u7528ScopedValue.where()\u518d\u94fe\u5f0f\u8c03\u7528run(Runnable)\u6216\u8005call(Callable)<\/p>\n<p>JDK25\u4f5c\u4e3a\u7b2c\u4e94\u6b21preview\uff0c\u6709\u4e2a\u6539\u52a8\u5c31\u662fScopedValue.orElse\u65b9\u6cd5\u4e0d\u518d\u63a5\u53d7null\u4f5c\u4e3a\u53c2\u6570<\/p>\n<p>\u793a\u4f8b\uff1a<\/p>\n<pre><code>class Framework {\n\n    private static final ScopedValue&lt;FrameworkContext&gt; CONTEXT\n                        = ScopedValue.newInstance();    \/\/ (1)\n\n    void serve(Request request, Response response) {\n        var context = createContext(request);\n        where(CONTEXT, context)                         \/\/ (2)\n                   .run(() -&gt; Application.handle(request, response));\n    }\n    \n    public PersistedObject readKey(String key) {\n        var context = CONTEXT.get();                    \/\/ (3)\n        var db = getDBConnection(context);\n        db.readKey(key);\n    }\n\n}<\/code><\/pre>\n<blockquote><p>\u5728 (1) \u4e2d\uff0c\u6846\u67b6\u58f0\u660e\u4e86\u4e00\u4e2a\u4f5c\u7528\u57df\u503c\uff0c\u800c\u4e0d\u662f\u4e00\u4e2athread local\u53d8\u91cf\u3002\u5728 (2)\uff0cserve\u65b9\u6cd5\u8c03\u7528where &#8230; run\u800c\u4e0d\u662fthread local\u7684set\u65b9\u6cd5\u3002run\u65b9\u6cd5\u63d0\u4f9b\u4e86\u6570\u636e\u7684\u5355\u5411\u5171\u4eabserve\u65b9\u6cd5\u5230readKey\u65b9\u6cd5\u3002(3) \u8bfb\u53d6\u7684\u503c\u662f\u7531Framework.serve\u7684\u65f6\u5019\u5199\u5165\u7684\u3002<\/p><\/blockquote>\n<h3><a href=\"https:\/\/link.segmentfault.com\/?enc=7ECQnlNp8En5ObIfAZveOA%3D%3D.4fvu%2BDw%2F6Tx7tXx2RsXCySV8ZKON2SUTs%2B20hUJvQVM%3D\" rel=\"nofollow noopener noreferrer\" target=\"_blank\">JEP 507: Primitive Types in Patterns, instanceof, and switch (Third Preview)<\/a><\/h3>\n<p>JDK19\u7684<a href=\"https:\/\/link.segmentfault.com\/?enc=LtZcJai3ipK5jkUVUfehRQ%3D%3D.1OIsHPF89t%2FdeFzumITWx9zXzC1bCmzqj0U9zZ5O1bo%3D\" rel=\"nofollow noopener noreferrer\" target=\"_blank\">JEP 405: Record Patterns (Preview)<\/a>\u5c06Record\u7684\u6a21\u5f0f\u5339\u914d\u4f5c\u4e3a\u7b2c\u4e00\u6b21preview<br \/>JDK20\u7684<a href=\"https:\/\/link.segmentfault.com\/?enc=MkHvPA8DW3H%2B5V8s%2Be9Btg%3D%3D.8T0JClzof%2Bgc9A3qa6ThaygDbakSIGkASbvKArkmD9U%3D\" rel=\"nofollow noopener noreferrer\" target=\"_blank\">JEP 432: Record Patterns (Second Preview)<\/a>\u4f5c\u4e3aRecord\u6a21\u5f0f\u5339\u914d\u7b2c\u4e8c\u6b21preview<br \/>JDK21\u7684<a href=\"https:\/\/link.segmentfault.com\/?enc=GG8gHg1qc2uHlLsGkpcHww%3D%3D.%2FZujxtkMQ9ej4Zp%2FY0JGE%2F7zxvVfReOWOyU1xZvVJvU%3D\" rel=\"nofollow noopener noreferrer\" target=\"_blank\">JEP 440: Record Patterns<\/a>\u5219\u5c06Record\u6a21\u5f0f\u5339\u914d\u6b63\u5f0f\u53d1\u5e03<br \/>JDK23\u7684<a href=\"https:\/\/link.segmentfault.com\/?enc=BnhglCtphQ%2FT1%2BjcwOJmCQ%3D%3D.jANkgVJbVs6B5ihfbs3wwuGfHmJ6KPXn7CHBZETB5sI%3D\" rel=\"nofollow noopener noreferrer\" target=\"_blank\">JEP 455: Primitive Types in Patterns, instanceof, and switch (Preview)<\/a>\u5c06\u539f\u59cb\u7c7b\u578b\u7684\u5339\u914d\u4f5c\u4e3a\u7b2c\u4e00\u6b21preview<br \/>JDK24\u7684<a href=\"https:\/\/link.segmentfault.com\/?enc=ZR%2BXSaPNSBAG3dSDUCLx1w%3D%3D.vDunjX8p5lYHJ2MvWaDLyTOYA7kMd3AQzEDyqR0PTb4%3D\" rel=\"nofollow noopener noreferrer\" target=\"_blank\">JEP 488: Primitive Types in Patterns, instanceof, and switch (Second Preview)<\/a>\u4f5c\u4e3a\u7b2c\u4e8c\u6b21preview<br \/>JDK25\u4f5c\u4e3a\u7b2c\u4e09\u6b21preview<\/p>\n<pre><code>record Point(int x, int y) {}\n\n\/\/ As of Java 21\nstatic void printSum(Object obj) {\n    if (obj instanceof Point(int x, int y)) {\n        System.out.println(x+y);\n    }\n}\n\nenum Color { RED, GREEN, BLUE }\nrecord ColoredPoint(Point p, Color c) {}\nrecord Rectangle(ColoredPoint upperLeft, ColoredPoint lowerRight) {}\n\/\/ As of Java 21\nstatic void printUpperLeftColoredPoint(Rectangle r) {\n    if (r instanceof Rectangle(ColoredPoint ul, ColoredPoint lr)) {\n         System.out.println(ul.c());\n    }\n}\n\nstatic void printColorOfUpperLeftPoint(Rectangle r) {\n    if (r instanceof Rectangle(ColoredPoint(Point p, Color c),\n                               ColoredPoint lr)) {\n        System.out.println(c);\n    }\n}<\/code><\/pre>\n<blockquote><p>\u4f46\u662f\u8fd9\u4e2a\u53ea\u662f\u652f\u6301Record\u7c7b\u578b<\/p><\/blockquote>\n<p>\u5728JDK14<a href=\"https:\/\/link.segmentfault.com\/?enc=amnOG1SAeJO%2BI7lVZF8XAg%3D%3D.25YvdMxsZlPF%2FmYUPO%2FjNXnRJ4DtQxuHql87RoU14AE%3D\" rel=\"nofollow noopener noreferrer\" target=\"_blank\">JEP 305: Pattern Matching for instanceof (Preview)<\/a>\u4f5c\u4e3apreview<br \/>\u5728JDK15<a href=\"https:\/\/link.segmentfault.com\/?enc=MLFQqvH5K2Da0sh3L1iOeg%3D%3D.fKdc7432hNcUg6ggZFB%2FVXoq2ij7cGcJqznfSEuZCuU%3D\" rel=\"nofollow noopener noreferrer\" target=\"_blank\">JEP 375: Pattern Matching for instanceof (Second Preview)<\/a>\u4f5c\u4e3a\u7b2c\u4e8c\u8f6e\u7684preview<br \/>\u5728JDK16<a href=\"https:\/\/link.segmentfault.com\/?enc=GIRi%2Ft8Te%2F3li%2FtKYs4j7w%3D%3D.Yhe5mlNuaRsHsTr5hUFhR3cHxyiTqnpx%2F3H2Jw89rZ4%3D\" rel=\"nofollow noopener noreferrer\" target=\"_blank\">JEP 394: Pattern Matching for instanceof<\/a>\u8f6c\u6b63<br \/>JDK17\u5f15\u5165<a href=\"https:\/\/link.segmentfault.com\/?enc=5SWfJ1r4XCaEgecxagHTbw%3D%3D.KT9XayC6ADShg%2B9ostkw22asmllp8LZiFg8P%2FielWAmQsa8zpSXbCYrl9ccEnBwS\" rel=\"nofollow noopener noreferrer\" target=\"_blank\">JEP 406: Pattern Matching for switch (Preview)<\/a><br \/>JDK18\u7684<a href=\"https:\/\/link.segmentfault.com\/?enc=XiERAFdRtM7rmwgWkc8Evg%3D%3D.gI1%2FbMWeXzXYgI31m%2BudDW37lIpsWkI0oT%2FraMKxsPw%3D\" rel=\"nofollow noopener noreferrer\" target=\"_blank\">JEP 420: Pattern Matching for switch (Second Preview)<\/a>\u5219\u4f5c\u4e3a\u7b2c\u4e8c\u8f6epreview<br \/>JDK19\u7684<a href=\"https:\/\/link.segmentfault.com\/?enc=C5zoV18n42C9ino2m8O8Rw%3D%3D.wRBjC6hqIZgWJTUXlRtFxgmJbPPLtXOzjbnG8HE3LtU%3D\" rel=\"nofollow noopener noreferrer\" target=\"_blank\">JEP 427: Pattern Matching for switch (Third Preview)<\/a>\u4f5c\u4e3a\u7b2c\u4e09\u8f6epreview<br \/>JDK20\u7684<a href=\"https:\/\/link.segmentfault.com\/?enc=qOiMcS1sapptfN3TbDP9lg%3D%3D.uZllPx0iuwN7U9FMIQc1ZVyWmjOxeytSouBPe4ewb8E%3D\" rel=\"nofollow noopener noreferrer\" target=\"_blank\">JEP 433: Pattern Matching for switch (Fourth Preview)<\/a>\u4f5c\u4e3a\u7b2c\u56db\u8f6epreview<br \/>JDK21\u7684<a href=\"https:\/\/link.segmentfault.com\/?enc=9woF84ssOsYZ4wXrKDpfmA%3D%3D.VdPQkPqh6NzsobKfkcFzSazFj7ElnoGFXGGpbQn%2FzxU%3D\" rel=\"nofollow noopener noreferrer\" target=\"_blank\">JEP 441: Pattern Matching for switch<\/a>\u5c06Pattern Matching for switch\u4f5c\u4e3a\u6b63\u5f0f\u7248\u672c\u53d1\u5e03\uff0c\u793a\u4f8b\u5982\u4e0b<\/p>\n<pre><code>\/\/ Prior to Java 21\nstatic String formatter(Object obj) {\n    String formatted = &quot;unknown&quot;;\n    if (obj instanceof Integer i) {\n        formatted = String.format(&quot;int %d&quot;, i);\n    } else if (obj instanceof Long l) {\n        formatted = String.format(&quot;long %d&quot;, l);\n    } else if (obj instanceof Double d) {\n        formatted = String.format(&quot;double %f&quot;, d);\n    } else if (obj instanceof String s) {\n        formatted = String.format(&quot;String %s&quot;, s);\n    }\n    return formatted;\n}\n\n\/\/ As of Java 21\nstatic String formatterPatternSwitch(Object obj) {\n    return switch (obj) {\n        case Integer i -&gt; String.format(&quot;int %d&quot;, i);\n        case Long l    -&gt; String.format(&quot;long %d&quot;, l);\n        case Double d  -&gt; String.format(&quot;double %f&quot;, d);\n        case String s  -&gt; String.format(&quot;String %s&quot;, s);\n        default        -&gt; obj.toString();\n    };\n}\n\n\/\/ As of Java 21\nstatic void testFooBarNew(String s) {\n    switch (s) {\n        case null         -&gt; System.out.println(&quot;Oops&quot;);\n        case &quot;Foo&quot;, &quot;Bar&quot; -&gt; System.out.println(&quot;Great&quot;);\n        default           -&gt; System.out.println(&quot;Ok&quot;);\n    }\n}\n\n\/\/ As of Java 21\nstatic void testStringEnhanced(String response) {\n    switch (response) {\n        case null -&gt; { }\n        case &quot;y&quot;, &quot;Y&quot; -&gt; {\n            System.out.println(&quot;You got it&quot;);\n        }\n        case &quot;n&quot;, &quot;N&quot; -&gt; {\n            System.out.println(&quot;Shame&quot;);\n        }\n        case String s\n        when s.equalsIgnoreCase(&quot;YES&quot;) -&gt; {\n            System.out.println(&quot;You got it&quot;);\n        }\n        case String s\n        when s.equalsIgnoreCase(&quot;NO&quot;) -&gt; {\n            System.out.println(&quot;Shame&quot;);\n        }\n        case String s -&gt; {\n            System.out.println(&quot;Sorry?&quot;);\n        }\n    }\n}\n\n\/\/ As of Java 21\nstatic void exhaustiveSwitchWithBetterEnumSupport(CardClassification c) {\n    switch (c) {\n        case Suit.CLUBS -&gt; {\n            System.out.println(&quot;It's clubs&quot;);\n        }\n        case Suit.DIAMONDS -&gt; {\n            System.out.println(&quot;It's diamonds&quot;);\n        }\n        case Suit.HEARTS -&gt; {\n            System.out.println(&quot;It's hearts&quot;);\n        }\n        case Suit.SPADES -&gt; {\n            System.out.println(&quot;It's spades&quot;);\n        }\n        case Tarot t -&gt; {\n            System.out.println(&quot;It's a tarot&quot;);\n        }\n    }\n}\n\n\/\/ As of Java 21\nsealed interface Currency permits Coin {}\nenum Coin implements Currency { HEADS, TAILS } \n\nstatic void goodEnumSwitch1(Currency c) {\n    switch (c) {\n        case Coin.HEADS -&gt; {    \/\/ Qualified name of enum constant as a label\n            System.out.println(&quot;Heads&quot;);\n        }\n        case Coin.TAILS -&gt; {\n            System.out.println(&quot;Tails&quot;);\n        }\n    }\n}\n\nstatic void goodEnumSwitch2(Coin c) {\n    switch (c) {\n        case HEADS -&gt; {\n            System.out.println(&quot;Heads&quot;);\n        }\n        case Coin.TAILS -&gt; {    \/\/ Unnecessary qualification but allowed\n            System.out.println(&quot;Tails&quot;);\n        }\n    }\n}\n\n\/\/ As of Java 21\nstatic void testNew(Object obj) {\n    switch (obj) {\n        case String s when s.length() == 1 -&gt; ...\n        case String s                      -&gt; ...\n        ...\n    }\n}<\/code><\/pre>\n<blockquote><p>\u4f46\u662fJDK21\u8fd8\u4e0d\u652f\u6301\u539f\u59cb\u7c7b\u578b\u7684\u5339\u914d<\/p><\/blockquote>\n<p>\u800c\u652f\u6301\u539f\u59cb\u7c7b\u578b\u7684\u5339\u914d\u4f7f\u7528\u793a\u4f8b\u5982\u4e0b\uff1a<\/p>\n<pre><code>switch (x.getStatus()) {\n    case 0 -&gt; &quot;okay&quot;;\n    case 1 -&gt; &quot;warning&quot;;\n    case 2 -&gt; &quot;error&quot;;\n    default -&gt; &quot;unknown status: &quot; + x.getStatus();\n}\n\nswitch (x.getStatus()) {\n    case 0 -&gt; &quot;okay&quot;;\n    case 1 -&gt; &quot;warning&quot;;\n    case 2 -&gt; &quot;error&quot;;\n    case int i -&gt; &quot;unknown status: &quot; + i;\n}\n\nswitch (x.getYearlyFlights()) {\n    case 0 -&gt; ...;\n    case 1 -&gt; ...;\n    case 2 -&gt; issueDiscount();\n    case int i when i &gt;= 100 -&gt; issueGoldCard();\n    case int i -&gt; ... appropriate action when i &gt; 2 &amp;&amp; i &lt; 100 ...\n}\n\nlong v = ...;\nswitch (v) {\n    case 1L              -&gt; ...;\n    case 2L              -&gt; ...;\n    case 10_000_000_000L -&gt; ...;\n    case 20_000_000_000L -&gt; ...;\n    case long x          -&gt; ... x ...;\n}\n\nif (roomSize instanceof byte) { \/\/ check if value of roomSize fits in a byte\n    ... (byte) roomSize ... \/\/ yes, it fits! but cast is required\n}<\/code><\/pre>\n<p>\u53e6\u5916\u9488\u5bf9instanceof\u793a\u4f8b\u5982\u4e0b:<\/p>\n<pre><code>byte b = 42;\nb instanceof int;         \/\/ true (unconditionally exact)\n\nint i = 42;\ni instanceof byte;        \/\/ true (exact)\n\nint i = 1000;\ni instanceof byte;        \/\/ false (not exact)\n\nint i = 16_777_217;       \/\/ 2^24 + 1\ni instanceof float;       \/\/ false (not exact)\ni instanceof double;      \/\/ true (unconditionally exact)\ni instanceof Integer;     \/\/ true (unconditionally exact)\ni instanceof Number;      \/\/ true (unconditionally exact)\n\nfloat f = 1000.0f;\nf instanceof byte;        \/\/ false\nf instanceof int;         \/\/ true (exact)\nf instanceof double;      \/\/ true (unconditionally exact)\n\ndouble d = 1000.0d;\nd instanceof byte;        \/\/ false\nd instanceof int;         \/\/ true (exact)\nd instanceof float;       \/\/ true (exact)\n\nInteger ii = 1000;\nii instanceof int;        \/\/ true (exact)\nii instanceof float;      \/\/ true (exact)\nii instanceof double;     \/\/ true (exact)\n\nInteger ii = 16_777_217;\nii instanceof float;      \/\/ false (not exact)\nii instanceof double;     \/\/ true (exact)<\/code><\/pre>\n<h3><a href=\"https:\/\/link.segmentfault.com\/?enc=2EmxbFhyVsEtHi9suN%2BGMA%3D%3D.BrO9M9J8HL4gwcuGNkpHIOg7BEK0DamWc7L5XbPQCQA%3D\" rel=\"nofollow noopener noreferrer\" target=\"_blank\">JEP 508: Vector API (Tenth Incubator)<\/a><\/h3>\n<p>JDK16\u5f15\u5165\u4e86<a href=\"https:\/\/link.segmentfault.com\/?enc=FHSFcY8mRzBeDouw%2Bjf0Eg%3D%3D.3Y0k6oRp4Xs7SEhV2u89R7A8EdQsnsmS4lhTX17Nlw3VABiGjk6hcGJb%2FzQ0oxss\" rel=\"nofollow noopener noreferrer\" target=\"_blank\">JEP 338: Vector API (Incubator)<\/a>\u63d0\u4f9b\u4e86jdk.incubator.vector\u6765\u7528\u4e8e\u77e2\u91cf\u8ba1\u7b97<br \/>JDK17\u8fdb\u884c\u6539\u8fdb\u5e76\u4f5c\u4e3a\u7b2c\u4e8c\u8f6e\u7684incubator<a href=\"https:\/\/link.segmentfault.com\/?enc=EY0ccaiCPvzSd2Bm9RUJ%2BA%3D%3D.HCFQXsGAziJ1K%2FBQj4HO5molyLy7NaMCnyqrp714rP%2B5OuKshQATopi8HMp3WoQS\" rel=\"nofollow noopener noreferrer\" target=\"_blank\">JEP 414: Vector API (Second Incubator)<\/a><br \/>JDK18\u7684<a href=\"https:\/\/link.segmentfault.com\/?enc=edYk5H53o7PWNQDhU1Vjwg%3D%3D.voUnYw8nJcNVSLOodDaZswMCW4quWEnqky3deBfulrY%3D\" rel=\"nofollow noopener noreferrer\" target=\"_blank\">JEP 417: Vector API (Third Incubator)<\/a>\u8fdb\u884c\u6539\u8fdb\u5e76\u4f5c\u4e3a\u7b2c\u4e09\u8f6e\u7684incubator<br \/>JDK19\u7684<a href=\"https:\/\/link.segmentfault.com\/?enc=Vzi20KDRZC%2BeFc%2FX7NJHVw%3D%3D.AlUWT33AaBPk4gAdha%2FzJWoTJgKSsIYEJKXWq721nCg%3D\" rel=\"nofollow noopener noreferrer\" target=\"_blank\">JEP 426:Vector API (Fourth Incubator)<\/a>\u4f5c\u4e3a\u7b2c\u56db\u8f6e\u7684incubator<br \/>JDK20\u7684<a href=\"https:\/\/link.segmentfault.com\/?enc=aKV1pet30OWj8Jp2URtpug%3D%3D.r9ituMRX1fYnfeCkj2TtbfftdgBmFrz8IZSTWZIVRxM%3D\" rel=\"nofollow noopener noreferrer\" target=\"_blank\">JEP 438: Vector API (Fifth Incubator)<\/a>\u4f5c\u4e3a\u7b2c\u4e94\u8f6e\u7684incubator<br \/>JDK21\u7684<a href=\"https:\/\/link.segmentfault.com\/?enc=09kUlXHbcXKZpMdQ36Hg9Q%3D%3D.3PMDg7XWwpSwlFgzIA3lKYZljdiKeodiWTrF46j2d%2BU%3D\" rel=\"nofollow noopener noreferrer\" target=\"_blank\">JEP 448: Vector API (Sixth Incubator)<\/a>\u4f5c\u4e3a\u7b2c\u516d\u8f6e\u7684incubator<br \/>JDK22\u7684<a href=\"https:\/\/link.segmentfault.com\/?enc=opFkbV1pld%2FogRRp7WXFOQ%3D%3D.4ZKzO8fV1O5ByyF0iatr4uAbSvxAoqX7GhyzsB6nZU0%3D\" rel=\"nofollow noopener noreferrer\" target=\"_blank\">JEP 460: Vector API (Seventh Incubator)<\/a>\u4f5c\u4e3a\u7b2c\u4e03\u8f6e\u7684incubator<br \/>JDK23\u7684<a href=\"https:\/\/link.segmentfault.com\/?enc=w%2FxF68berswXYVJe87g2jA%3D%3D.VJOaGyVIki3VBJ9ZgOS48vRPYrZUhtvnvrmg4aghyZg%3D\" rel=\"nofollow noopener noreferrer\" target=\"_blank\">JEP 469: Vector API (Eighth Incubator)<\/a>\u4f5c\u4e3a\u7b2c\u516b\u8f6eincubator<br \/>JDK24\u7684<a href=\"https:\/\/link.segmentfault.com\/?enc=474RqOA0mtnesOjTNQg%2Frw%3D%3D.2lKUfe8FPUnKKHAFS29wh%2Fo8X6RBZa8XV6XekzegjH0%3D\" rel=\"nofollow noopener noreferrer\" target=\"_blank\">JEP 489: Vector API (Ninth Incubator)<\/a>\u5219\u4f5c\u4e3a\u7b2c\u4e5d\u8f6eincubator\uff0c\u4e0eJDK23\u76f8\u6bd4\u505a\u4e86\u4e00\u4e9b\u53d8\u52a8\uff1a\u6bd4\u5982\u5f15\u5165\u4e86\u4e00\u4e2a\u65b0\u7684\u57fa\u4e8e\u503c\u7684\u7c7bFloat16\uff0c\u7528\u4e8e\u8868\u793aIEEE 754\u4e8c\u8fdb\u523616\u683c\u5f0f\u768416\u4f4d\u6d6e\u70b9\u6570\u3002<\/p>\n<p>JDK25\u4f5c\u4e3a\u7b2c\u5341\u8f6eincubator\uff0c\u4e3b\u8981\u53d8\u5316\u662f\uff1aVectorShuffle\u73b0\u5728\u652f\u6301\u8bbf\u95ee\u548c\u8bbf\u95eeMemorySegment\uff0c\u8be5\u5b9e\u73b0\u662f\u901a\u8fc7Foreign Function &#038; Memory API (JEP 454) \u800c\u4e0d\u662f\u901a\u8fc7HotSpot\u5185\u90e8\u7684C++\u4ee3\u7801\uff0c\u63d0\u9ad8\u4e86\u53ef\u7ef4\u62a4\u6027\uff0c\u53e6\u5916\u5bf9Float16\u503c\u7684\u52a0\u6cd5\u3001\u51cf\u6cd5\u3001\u9664\u6cd5\u3001\u4e58\u6cd5\u3001\u5e73\u65b9\u6839\u548cfused\u4e58\u6cd5\/\u52a0\u6cd5\u8fd0\u7b97\u73b0\u5728\u652f\u6301x64 cpu\u81ea\u52a8\u77e2\u91cf\u5316<\/p>\n<h3><a href=\"https:\/\/link.segmentfault.com\/?enc=o6BvdoMrKrbImoWs4hUXXQ%3D%3D.%2FlHpP3fGR0bGnbdRMDdM22HrpIBtcrqHaPKVN9c9yug%3D\" rel=\"nofollow noopener noreferrer\" target=\"_blank\">JEP 509: JFR CPU-Time Profiling (Experimental)<\/a><\/h3>\n<p>\u672c\u7279\u6027\u5f15\u5165\u4e86\u5b9e\u9a8c\u7248\u7684CPU-Time Profiling\uff0c\u53ef\u4ee5\u6355\u83b7\u66f4\u51c6\u786e\u7684CPU\u65f6\u95f4\u5206\u6790\u4fe1\u606f<br \/>\u4f7f\u7528\u793a\u4f8b<\/p>\n<pre><code>$ java -XX:StartFlightRecording=jdk.CPUTimeSample#enabled=true,filename=profile.jfr ...\n$ jfr view cpu-time-hot-methods profile.jfr<\/code><\/pre>\n<p>\u914d\u5408jcmd\u4f7f\u7528\u5982\u4e0b<\/p>\n<pre><code>jcmd &lt;pid&gt; JFR.start settings=\/tmp\/cpu_profile.jfc duration=4m\njcmd &lt;pid&gt; JFR.stop<\/code><\/pre>\n<h3><a href=\"https:\/\/link.segmentfault.com\/?enc=qb7tl1SiiMHFcvsxIXPziw%3D%3D.tpbsgG0FnrkuUaA8Ka6ST5JAE%2BUzLRtEU69MpNZ5A%2Bs%3D\" rel=\"nofollow noopener noreferrer\" target=\"_blank\">JEP 510: Key Derivation Function API<\/a><\/h3>\n<p>JDK 21\u4e2d\u5305\u542b\u7684<a href=\"https:\/\/link.segmentfault.com\/?enc=o7yAIZafpdlCtg6cr4YSBQ%3D%3D.ATJUYvFo83XeJbTdZZimllLurKBNWaVhRt%2FVlfrIdqk%3D\" rel=\"nofollow noopener noreferrer\" target=\"_blank\">KEM API\uff08JEP 452\uff09<\/a>\u662fHPKE\u7684\u4e00\u4e2a\u7ec4\u6210\u90e8\u5206\uff0c\u6807\u5fd7\u7740Java\u671d\u7740HPKE\u8fc8\u51fa\u7684\u7b2c\u4e00\u6b65\uff0c\u5e76\u4e3a\u540e\u91cf\u5b50\u6311\u6218\u505a\u597d\u4e86\u51c6\u5907\u3002<br \/>\u5728JDK24\u7684<a href=\"https:\/\/link.segmentfault.com\/?enc=jF3atN7rcEi0QgjrQYi0Fw%3D%3D.PCXbnDN%2Fvil%2B78qtwj%2BlFD9HHi3y38Q1ADertagQ5Sg%3D\" rel=\"nofollow noopener noreferrer\" target=\"_blank\">JEP 478: Key Derivation Function API (Preview)<\/a>\u4e2d\u63d0\u51fa\u4e86HPKE\u7684\u53e6\u4e00\u4e2a\u7ec4\u6210\u90e8\u5206\uff0c\u4f5c\u4e3a\u8fd9\u4e00\u65b9\u5411\u4e0a\u7684\u4e0b\u4e00\u6b65\uff1a\u5bc6\u94a5\u6d3e\u751f\u51fd\u6570\uff08KDFs\uff09\u7684API\uff0c\u4f5c\u4e3a\u9884\u89c8\u7248\u672c<br \/>\u5728JDK25\u8f6c\u4e3a\u6b63\u5f0f\u7248\uff0c\u65e0\u9700<code>--enable-preview<\/code>\u53c2\u6570<\/p>\n<p>\u4f7f\u7528\u793a\u4f8b\u5982\u4e0b\uff1a<\/p>\n<pre><code>\/\/ Create a KDF object for the specified algorithm\nKDF hkdf = KDF.getInstance(&quot;HKDF-SHA256&quot;); \n\n\/\/ Create an ExtractExpand parameter specification\nAlgorithmParameterSpec params =\n    HKDFParameterSpec.ofExtract()\n                     .addIKM(initialKeyMaterial)\n                     .addSalt(salt).thenExpand(info, 32);\n\n\/\/ Derive a 32-byte AES key\nSecretKey key = hkdf.deriveKey(&quot;AES&quot;, params);\n\n\/\/ Additional deriveKey calls can be made with the same KDF object<\/code><\/pre>\n<h3><a href=\"https:\/\/link.segmentfault.com\/?enc=dh42vk8lhLiBMSDDiivEDg%3D%3D.t0SAtbaeOq7zTklj66S0WelhriW7wYqIdlxeHqTcfpk%3D\" rel=\"nofollow noopener noreferrer\" target=\"_blank\">JEP 511: Module Import Declarations<\/a><\/h3>\n<blockquote><p>\u4e0e<a href=\"https:\/\/link.segmentfault.com\/?enc=2CsAHGBZKoaz5OeNazF7Gg%3D%3D.pc54LXTkyyoaEnxto5pmTxzO2C7zwfTFKY9bSr7SQPk%3D\" rel=\"nofollow noopener noreferrer\" target=\"_blank\">JEP 477: Implicitly Declared Classes and Instance Main Methods (Third Preview)<\/a>\u7c7b\u4f3c\uff0c\u672c\u7279\u6027\u4e3b\u8981\u662f\u4e3a\u4e86\u7b80\u5316\u8bed\u6cd5\u65b9\u4fbf\u65b0\u624b\u4f7f\u7528\uff0c\u901a\u8fc7\u65b0\u5f15\u5165module\u7684import\uff0c\u6765\u4e00\u6b21\u6027\u5bfc\u5165module\u4e0b\u6240\u6709package\u5e95\u4e0b\u7684\u7c7b<\/p><\/blockquote>\n<p>JDK23\u7684<a href=\"https:\/\/link.segmentfault.com\/?enc=nxWHLKwmPHp7172kJAVOtQ%3D%3D.GctPvpEqz7Vsw5Vu5K8GCEM9BPOUHNryO8oV72uICY8%3D\" rel=\"nofollow noopener noreferrer\" target=\"_blank\">JEP 476: Module Import Declarations (Preview)<\/a>\u4f5c\u4e3a\u7b2c\u4e00\u4e2apreview<br \/>JDK24\u7684<a href=\"https:\/\/link.segmentfault.com\/?enc=Bt0gyi%2BzV7iftHjALnRZhA%3D%3D.OhQqBVgFYQUAphQDi2NHiOY%2BsB9lPbTq8Wl9HpryzCM%3D\" rel=\"nofollow noopener noreferrer\" target=\"_blank\">JEP 494: Module Import Declarations (Second Preview)<\/a>\u4f5c\u4e3a\u7b2c\u4e8c\u6b21preview\uff0c\u4e0eJDK23\u4e0d\u540c\u7684\u662f\u53d6\u6d88\u4e86\u6a21\u5757\u4e0d\u5141\u8bb8\u58f0\u660e\u5bf9java.base\u6a21\u5757\u4f20\u9012\u4f9d\u8d56\u7684\u9650\u5236\uff0c\u5e76\u4fee\u8ba2\u4e86java.se\u6a21\u5757\u58f0\u660e\uff0c\u4f7f\u5176\u4f20\u9012\u6027\u5730\u4f9d\u8d56\u4e8ejava.base\u6a21\u5757\u3002\u8fd9\u4e9b\u53d8\u5316\u610f\u5473\u7740\u5bfc\u5165java.se\u6a21\u5757\u5c06\u6309\u9700\u5bfc\u5165\u6574\u4e2aJava SE API\u3002\u6b64\u5916\uff0c\u73b0\u5728\u5141\u8bb8\u6309\u9700\u58f0\u660e\u7684\u7c7b\u578b\u5bfc\u5165\u58f0\u660e\u8986\u76d6\u6a21\u5757\u5bfc\u5165\u58f0\u660e\u3002<br \/>JDK25\u4f5c\u4e3a\u6b63\u5f0f\u7248\uff0c\u6ca1\u6709\u53d8\u5316<\/p>\n<p>\u793a\u4f8b:<\/p>\n<pre><code>import module java.base;  \/\/ \u5305\u542b\u4e86import java.io.*; import java.util.*;\n\nimport module java.base;      \/\/ exports java.util, which has a public Date class\nimport module java.sql;       \/\/ exports java.sql, which has a public Date class\n\nimport java.sql.Date;         \/\/ resolve the ambiguity of the simple name Date!\n\n...\nDate d = ...                  \/\/ Ok!  Date is resolved to java.sql.Date\n...<\/code><\/pre>\n<blockquote><p>\u7531\u4e8e\u662f\u6b63\u5f0f\u7248\uff0c\u4e0d\u518d\u9700\u8981\u4f7f\u7528<code>--enable-preview<\/code>\u53c2\u6570\u6765\u5f00\u542f<\/p><\/blockquote>\n<h3><a href=\"https:\/\/link.segmentfault.com\/?enc=xS3Wh6SxPqwNe%2FdFb7yMKQ%3D%3D.GDbgiMF1mUDDG%2FXdqIxHUZ%2BYaYb6ysPikxh7RbKtUUY%3D\" rel=\"nofollow noopener noreferrer\" target=\"_blank\">JEP 512: Compact Source Files and Instance Main Methods<\/a><\/h3>\n<p>JDK21\u7684<a href=\"https:\/\/link.segmentfault.com\/?enc=wRnS52scdGD3yXy%2FmAbULQ%3D%3D.vtN9117NhiTOWTPePuvw9OuraovJB4bbk7kEPnXzk9c%3D\" rel=\"nofollow noopener noreferrer\" target=\"_blank\">JEP 445: Unnamed Classes and Instance Main Methods (Preview)<\/a>\u4f5c\u4e3a\u9996\u6b21preview\uff0c\u5f15\u5165\u4e86\u672a\u547d\u540d\u7684\u7c7b\u548c\u5b9e\u4f8bmain\u65b9\u6cd5\u7279\u6027\u53ef\u4ee5\u7b80\u5316hello world\u793a\u4f8b\uff0c\u65b9\u4fbfjava\u65b0\u624b\u5165\u95e8<br \/>JDK22\u7684<a href=\"https:\/\/link.segmentfault.com\/?enc=Hrn0N7Qe6Oq0qzrB5IwvEw%3D%3D.CGwBo%2FUeJrkOOcQBbTPTrkVC%2B2LHFvlTHGBXIgtMeqg%3D\" rel=\"nofollow noopener noreferrer\" target=\"_blank\">JEP 463: Implicitly Declared Classes and Instance Main Methods (Second Preview)<\/a>\u4f5c\u4e3a\u7b2c\u4e8c\u6b21\u7684preview<br \/>JDK23\u7684<a href=\"https:\/\/link.segmentfault.com\/?enc=bdCMfq7XST6HuTvv6iRKow%3D%3D.AXbtndYaNx19rgCC1V21vD%2BPSTs4csDR20rbtFMrNbk%3D\" rel=\"nofollow noopener noreferrer\" target=\"_blank\">JEP 477: Implicitly Declared Classes and Instance Main Methods (Third Preview)<\/a>\u4f5c\u4e3a\u7b2c\u4e09\u6b21preview<br \/>JDK24\u7684<a href=\"https:\/\/link.segmentfault.com\/?enc=OdE%2F8g%2B1THEjaUwALl%2ByJg%3D%3D.0XqDsMH3tjH6RXGtclZWn3%2Fkkew9M%2B1rLo%2BxldB5PAI%3D\" rel=\"nofollow noopener noreferrer\" target=\"_blank\">JEP 495: Simple Source Files and Instance Main Methods (Fourth Preview)<\/a>\u5219\u4f5c\u4e3a\u7b2c\u56db\u6b21preview<br \/>JDK25\u4f5c\u4e3a\u6b63\u5f0f\u7248\u672c\uff0c\u6709\u4e9b\u6539\u52a8\uff1a<\/p>\n<ul>\n<li>console I\/O\u7684\u65b0IO\u7c7b\u73b0\u5728\u4f4d\u4e8ejava.lang\uff0c\u800c\u4e0d\u662fjava.io\u5305\uff0c\u73b0\u5728\u9690\u5f0f\u5bfc\u5165\u5230\u6bcf\u4e2a\u6e90\u6587\u4ef6<\/li>\n<li>IO\u7c7b\u7684\u9759\u6001\u65b9\u6cd5\u4e0d\u518d\u9690\u5f0f\u5bfc\u5165compact source files\uff0c\u9700\u8981\u663e\u793a\u5bfc\u5165<\/li>\n<li>IO\u7c7b\u7684\u5b9e\u73b0\u57fa\u4e8eSystem.out\u53caSystem.in\uff0c\u800c\u975ejava.io.Console\u7c7b<\/li>\n<\/ul>\n<p>\u793a\u4f8b\u5982\u4e0b\uff1a<\/p>\n<pre><code>void main() {\n    String name = IO.readln(&quot;Please enter your name: &quot;);\n    IO.print(&quot;Pleased to meet you, &quot;);\n    IO.println(name);\n}<\/code><\/pre>\n<h3><a href=\"https:\/\/link.segmentfault.com\/?enc=%2BnLakpCxWbRcvUroSGOnqA%3D%3D.3n4b2rHJo7Iwk2bCXUoj2UxS2z1EY27thABPXX0hueU%3D\" rel=\"nofollow noopener noreferrer\" target=\"_blank\">JEP 513: Flexible Constructor Bodies<\/a><\/h3>\n<p>JDK22\u7684<a href=\"https:\/\/link.segmentfault.com\/?enc=sYdehgVOxDV5tkGKLLIDzg%3D%3D.%2BSteCmhK1SU6%2B53l4stitomvQdD2YkOIGo2ft2ZVzKg%3D\" rel=\"nofollow noopener noreferrer\" target=\"_blank\">JEP 447: Statements before super(&#8230;) (Preview)<\/a>\u4f5c\u4e3a\u7b2c\u4e00\u6b21preview<br \/>JDK23\u7684<a href=\"https:\/\/link.segmentfault.com\/?enc=82gc7qjBLKrtJLVYgIBdYA%3D%3D.EXiUIVIvcCSWMk4Xi1yCSy7%2B8DiPOBmkOMKB5QmBpNY%3D\" rel=\"nofollow noopener noreferrer\" target=\"_blank\">JEP 482: Flexible Constructor Bodies (Second Preview)<\/a>\u4f5c\u4e3a\u7b2c\u4e8c\u6b21preview<br \/>JDK24\u7684<a href=\"https:\/\/link.segmentfault.com\/?enc=lAwFo4ETXzo7fz8DvmGSKA%3D%3D.QA5THLwkrujW7f1b5%2BENh0FxKCBN%2Flaj71tZaLNjoW0%3D\" rel=\"nofollow noopener noreferrer\" target=\"_blank\">JEP 492: Flexible Constructor Bodies (Third Preview)<\/a>\u4f5c\u4e3a\u7b2c\u4e09\u6b21preview<br \/>JDK25\u4f5c\u4e3a\u6b63\u5f0f\u7248\u672c\uff0c\u6ca1\u6709\u53d8\u5316<\/p>\n<p>\u6bd4\u5982\u5728JEP 447\u4e4b\u524d\u7684\u4ee3\u7801\u5982\u4e0b\uff1a<\/p>\n<pre><code>public class PositiveBigInteger extends BigInteger {\n\n    public PositiveBigInteger(long value) {\n        super(value);               \/\/ Potentially unnecessary work\n        if (value &lt;= 0)\n            throw new IllegalArgumentException(non-positive value);\n    }\n\n}<\/code><\/pre>\n<p>\u5728JEP 447\u4e4b\u540e\u4ee3\u7801\u53ef\u4ee5\u5982\u4e0b\uff1a<\/p>\n<pre><code>public class PositiveBigInteger extends BigInteger {\n\n    public PositiveBigInteger(long value) {\n        if (value &lt;= 0)\n            throw new IllegalArgumentException(non-positive value);\n        super(value);\n    }\n\n}<\/code><\/pre>\n<h3><a href=\"https:\/\/link.segmentfault.com\/?enc=ODLz3G4zIAgtzSlyRQI2Qw%3D%3D.Pp0Cl5m2EdE8TgJZLHMJJ9M7k1f1ekixHN4aR1bmT80%3D\" rel=\"nofollow noopener noreferrer\" target=\"_blank\">JEP 514: Ahead-of-Time Command-Line Ergonomics<\/a><\/h3>\n<p>\u5728JDK24\u7684<a href=\"https:\/\/link.segmentfault.com\/?enc=MwZQ2D7ZRHXRwhCWu15wsA%3D%3D.HpyMJPXtCQ9CMcglg5slXDuvwfaClZ0OQJarDlJiGy4%3D\" rel=\"nofollow noopener noreferrer\" target=\"_blank\">JEP 483: Ahead-of-Time Class Loading &#038; Linking<\/a>\u652f\u6301\u4e86\u901a\u8fc7Ahead-of-Time Cache\u6765\u5b58\u50a8\u5df2\u7ecf\u8bfb\u53d6\u3001\u89e3\u6790\u3001\u52a0\u8f7d\u548c\u94fe\u63a5\u7684\u7c7b<br \/>\u5728JDK25\u5219\u901a\u8fc7\u7b80\u5316\u5e38\u89c1\u7528\u4f8b\u6240\u9700\u7684\u547d\u4ee4\u6765\u52a0\u901fjava\u5e94\u7528\u7a0b\u5e8f\u7684\u542f\u52a8\u3002<\/p>\n<p>\u5728JDK24\u65f6\u5206\u4e24\u6b65\u521b\u5efaAOT\u7f13\u5b58\uff1a<\/p>\n<ul>\n<li>\n<p>\u9996\u5148\u8fd0\u884capplication\u6765\u8bb0\u5f55AOT\u914d\u7f6e:<\/p>\n<pre><code>java -XX:AOTMode=record -XX:AOTConfiguration=app.aotconf -cp app.jar com.example.App ...<\/code><\/pre>\n<\/li>\n<li>\n<p>\u63a5\u7740\u4f7f\u7528\u8be5\u914d\u7f6e\u6765\u521b\u5efaAOT\u7f13\u5b58\uff1a<\/p>\n<pre><code>java -XX:AOTMode=create -XX:AOTConfiguration=app.aotconf -XX:AOTCache=app.aot -cp app.jar<\/code><\/pre>\n<\/li>\n<li>\n<p>\u6700\u540e\u4f7f\u7528AOT\u7f13\u5b58\u542f\u52a8\uff1a<\/p>\n<pre><code>java -XX:AOTCache=app.aot -cp app.jar com.example.App ...<\/code><\/pre>\n<blockquote><p>AOT\u7f13\u5b58\u5c06\u8bfb\u53d6\u3001\u89e3\u6790\u3001\u52a0\u8f7d\u548c\u94fe\u63a5\uff08\u901a\u5e38\u5728\u7a0b\u5e8f\u6267\u884c\u671f\u95f4\u5373\u65f6\u5b8c\u6210\uff09\u7684\u4efb\u52a1\u63d0\u524d\u5230\u7f13\u5b58\u521b\u5efa\u7684\u65e9\u671f\u9636\u6bb5\u3002\u56e0\u6b64\uff0c\u5728\u6267\u884c\u9636\u6bb5\uff0c\u7a0b\u5e8f\u542f\u52a8\u901f\u5ea6\u66f4\u5feb\uff0c\u56e0\u4e3a\u5176\u7c7b\u53ef\u4ee5\u4ece\u7f13\u5b58\u4e2d\u5feb\u901f\u8bbf\u95ee\u3002\u5176\u6027\u80fd\u63d0\u5347\u53ef\u4ee5\u9ad8\u8fbe 42%\u3002<br \/>\u4f46\u662f\u9700\u8981\u8fd0\u884c2\u6b21\u6765\u521b\u5efaAOT\u7f13\u5b58\u3002\u7559\u4e0bAOT\u914d\u7f6e\u6587\u4ef6\u4e5f\u5f88\u4e0d\u65b9\u4fbf\uff0c\u5b83\u53ea\u662f\u4e00\u4e2a\u4e34\u65f6\u6587\u4ef6\uff0c\u751f\u4ea7\u8fd0\u884c\u4e0d\u9700\u8981\uff0c\u53ef\u4ee5\u5220\u9664\u3002<\/p><\/blockquote>\n<\/li>\n<\/ul>\n<p>JDK25\u901a\u8fc7\u5f15\u5165<code>AOTCacheOutput<\/code>\u5c06\u4e24\u6b65\u5408\u4e3a\u4e00\u6b65\uff0c\u5b83\u5b9e\u9645\u4e0a\u5c06\u5176\u8c03\u7528\u62c6\u5206\u4e3a\u4e24\u4e2a\u5b50\u8c03\u7528: \u7b2c\u4e00\u4e2a\u6267\u884c\u8bad\u7ec3\u8fd0\u884c (AOTMode=record)\uff0c\u7136\u540e\u7b2c\u4e8c\u4e2a\u521b\u5efaAOT\u7f13\u5b58 (AOTMode=create)\uff0c\u53ef\u4ee5\u901a\u8fc7\u65b0\u7684\u73af\u5883\u53d8\u91cfJDK_AOT_VM_OPTIONS\u6765\u8986\u76d6\u4f20\u9012\u7ed9cache create\u8fd9\u4e2a\u5b50\u8fc7\u7a0b\u7684VM\u547d\u4ee4\u3002<\/p>\n<pre><code>java -XX:AOTCacheOutput=app.aot -cp app.jar com.example.App ...<\/code><\/pre>\n<blockquote><p>\u5f53\u4ee5\u8fd9\u79cd\u65b9\u5f0f\u64cd\u4f5c\u65f6\uff0cJVM\u4e3aAOT\u914d\u7f6e\u521b\u5efa\u4e34\u65f6\u6587\u4ef6\uff0c\u5e76\u5728\u5b8c\u6210\u65f6\u5220\u9664\u8be5\u6587\u4ef6\u3002<\/p><\/blockquote>\n<p>\u4f7f\u7528\u7684\u65f6\u5019\u4e00\u6837\uff1a<\/p>\n<pre><code>java -XX:AOTCache=app.aot -cp app.jar com.example.App ...<\/code><\/pre>\n<h3><a href=\"https:\/\/link.segmentfault.com\/?enc=8hu6mNOm0dggJ1GmYRhGDg%3D%3D.6T4UdJ%2Fnzmr6J8PqnCnl%2FrcIpcHMd6qYZqJiasvsZAE%3D\" rel=\"nofollow noopener noreferrer\" target=\"_blank\">JEP 515: Ahead-of-Time Method Profiling<\/a><\/h3>\n<p>\u5728JDK24\u7684<a href=\"https:\/\/link.segmentfault.com\/?enc=jOrAFI5aOlIJVjRByBBesA%3D%3D.pFy9cJRNf7SkK3BxtDTYb4qYIz08yjjdR15kv%2FEtmx0%3D\" rel=\"nofollow noopener noreferrer\" target=\"_blank\">JEP 483: Ahead-of-Time Class Loading &#038; Linking<\/a>\u652f\u6301\u4e86\u901a\u8fc7Ahead-of-Time Cache\u6765\u5b58\u50a8\u5df2\u7ecf\u8bfb\u53d6\u3001\u89e3\u6790\u3001\u52a0\u8f7d\u548c\u94fe\u63a5\u7684\u7c7b<br \/>JVM\u53ef\u4ee5\u8bc6\u522b\u6267\u884c\u6700\u9891\u7e41\u6216\u6d88\u8017\u6700\u591aCPU\u65f6\u95f4\u7684\u4ee3\u7801\uff0c\u5e76\u901a\u8fc7\u5c06\u5176\u7f16\u8bd1\u4e3a\u672c\u673a\u4ee3\u7801\u6765\u4f18\u5316\u6b64\u4ee3\u7801\u3002\u6b64\u8fc7\u7a0b\u79f0\u4e3a\u5206\u6790\u3002\u7b80\u5355\u6765\u8bf4\uff0c\u914d\u7f6e\u6587\u4ef6\u662f\u4e0e\u65b9\u6cd5\u76f8\u5173\u7684\u6709\u7528\u4fe1\u606f\u7684\u96c6\u5408\uff0c\u4f8b\u5982\u5df2\u6267\u884c\u7684\u6b21\u6570\u3002\u5f53\u5e94\u7528\u7a0b\u5e8f\u4ee5\u901a\u5e38\u7684\u65b9\u5f0f (\u6ca1\u6709AOT\u7f13\u5b58) \u8fd0\u884c\u65f6\uff0c\u8fd9\u4e9b\u914d\u7f6e\u6587\u4ef6\u5728\u5e94\u7528\u7a0b\u5e8f\u6267\u884c\u5f00\u59cb\u65f6\u6536\u96c6\u3002\u8fd9\u4e2aJEP\u80cc\u540e\u7684\u6982\u5ff5\u662f\uff0c\u6211\u4eec\u53ef\u4ee5\u5728\u8bad\u7ec3\u8fd0\u884c\u671f\u95f4\u6536\u96c6\u914d\u7f6e\u6587\u4ef6\uff0c\u7136\u540e\u5728\u540e\u7eed\u8fd0\u884c\u4e2d\u91cd\u590d\u4f7f\u7528\u5b83\u4eec\u3002\u8fd9\u610f\u5473\u7740\u5728\u4ee5\u540e\u7684\u6267\u884c\u4e2d\uff0c\u65e0\u9700\u5728\u542f\u52a8\u540e\u6536\u96c6\u914d\u7f6e\u6587\u4ef6\uff0c\u4ece\u800c\u53ef\u4ee5\u7acb\u5373\u5f00\u59cb\u4ee3\u7801\u7f16\u8bd1\u3002\u8bad\u7ec3\u8fd0\u884c\u7684\u8d28\u91cf\u4f1a\u663e\u7740\u5f71\u54cd\u5e94\u7528\u7a0b\u5e8f\u9884\u70ed\u65f6\u95f4\u7684\u6539\u5584\u3002\u8bad\u7ec3\u8dd1\u5f97\u8d8a\u597d\uff0c\u5728\u968f\u540e\u7684\u8dd1\u4e2d\u83b7\u5f97\u7684\u6027\u80fd\u589e\u5f3a\u5c31\u8d8a\u5927\u3002<br \/>\u672c\u7279\u6027\u5c06\u751f\u4ea7\u73af\u5883\u505a\u7684Method Profiling\u632a\u5230\u4e86Ahead-of-Time Cache\u9636\u6bb5\uff0c\u4f7f\u5f97\u751f\u4ea7\u73af\u5883\u542f\u52a8\u7684\u65f6\u5019\u5c31\u8bfb\u53d6\u8fd9\u4e9b\u6570\u636e\uff0cJIT\u7acb\u5373\u5bf9\u771f\u6b63\u7684\u70ed\u70b9\u65b9\u6cd5\u8fdb\u884c\u7f16\u8bd1\uff0c\u65e0\u9700\u8fb9\u8dd1\u8fb9\u6536\u96c6\u3002<\/p>\n<h3><a href=\"https:\/\/link.segmentfault.com\/?enc=fJZ1ymHnAkYyShAsJDmC4w%3D%3D.jzkwUw9hP035qYD5sr6UKPLQMOCknqN%2BklbYoL9w0Fw%3D\" rel=\"nofollow noopener noreferrer\" target=\"_blank\">JEP 518: JFR Cooperative Sampling<\/a><\/h3>\n<p>\u672c\u7279\u6027\u63d0\u9ad8JFR\u5f02\u6b65\u91c7\u6837Java\u7ebf\u7a0b\u5806\u6808\u65f6\u7684\u7a33\u5b9a\u6027\uff0c\u901a\u8fc7\u4ec5\u5728\u5b89\u5168\u70b9\u5904\u904d\u5386\u8c03\u7528\u5806\u6808\u6765\u5b9e\u73b0\u6b64\u76ee\u7684\uff0c\u540c\u65f6\u6700\u5927\u7a0b\u5ea6\u5730\u51cf\u5c11\u5b89\u5168\u70b9\u504f\u5dee\u3002<\/p>\n<h3><a href=\"https:\/\/link.segmentfault.com\/?enc=oTZgNUbndfnAqnVIaTJzsQ%3D%3D.Q52hXtRSLizozsR%2F9mK%2FBN8BGJSFlhWcrLmzDrqq1Zk%3D\" rel=\"nofollow noopener noreferrer\" target=\"_blank\">JEP 519: Compact Object Headers<\/a><\/h3>\n<p>\u5728JDK24\u7684<a href=\"https:\/\/link.segmentfault.com\/?enc=5Fi0jJgoanOHKkMr5Kqzpw%3D%3D.7QOmWm33qNpW8QyUK8od89IccNnN%2F73VBu7Tk%2Fr3bBY%3D\" rel=\"nofollow noopener noreferrer\" target=\"_blank\">JEP 450: Compact Object Headers (Experimental)<\/a>\u7279\u6027\u4e2d\uff0c\u572864\u4f4d\u67b6\u6784\u4e0a\uff0c\u5c06 HotSpot JVM\u4e2d\u7684\u5bf9\u8c61\u6807\u5934\u5927\u5c0f\u4ece96\u5230128\u4f4d\u51cf\u5c11\u523064\u4f4d\u3002\u5728SPECjbb2015\u7684\u6d4b\u8bd5\u4e2d\u51cf\u5c11\u4e8622%\u7684\u5806\u7a7a\u95f4\u548c8%\u7684CPU\u65f6\u95f4\uff0c\u5b8c\u6210\u7684\u5783\u573e\u6536\u96c6\u6570\u91cf\u4e3a\u51cf\u5c1115%\uff0c\u4e00\u4e2a\u9ad8\u5ea6\u5e76\u884c\u7684JSON\u89e3\u6790\u5668\u57fa\u51c6\u8fd0\u884c\u65f6\u95f4\u51cf\u5c1110%\u3002<br \/>\u5728JDK25\u8f6c\u4e3a\u6b63\u5f0f\u7248\uff0c\u65e0\u9700<code>-XX:+UnlockExperimentalVMOptions<\/code>\u547d\u4ee4<\/p>\n<pre><code>-XX:+UseCompactObjectHeaders<\/code><\/pre>\n<h3><a href=\"https:\/\/link.segmentfault.com\/?enc=StTJ82fcGHsdSJEWDiw2Fg%3D%3D.WY0nmcoMushakMam2E4gw5kP8XCmO5Mqdw52YRX42dc%3D\" rel=\"nofollow noopener noreferrer\" target=\"_blank\">JEP 520: JFR Method Timing &#038; Tracing<\/a><\/h3>\n<p>\u672c\u7279\u6027\u5f15\u5165\u4e86\u4e24\u4e2a\u65b0\u7684JFR\u4e8b\u4ef6\uff0cjdk.MethodTiming\u548cjdk.MethodTrace\uff0c\u901a\u8fc7\u5b57\u8282\u7801\u7ec7\u5165\u6765\u8ffd\u8e2a\u65b9\u6cd5<br \/>\u4f7f\u7528\u793a\u4f8b<\/p>\n<pre><code>$ java -XX:StartFlightRecording:jdk.MethodTrace#filter=java.util.HashMap::resize,filename=recording.jfr ...\n$ jfr print --events jdk.MethodTrace --stack-depth 20 recording.jfr\njdk.MethodTrace {\n    startTime = 00:39:26.379 (2025-03-05)\n    duration = 0.00113 ms\n    method = java.util.HashMap.resize()\n    eventThread = &quot;main&quot; (javaThreadId = 3)\n    stackTrace = [\n      java.util.HashMap.putVal(int, Object, Object, boolean, boolean) line: 636\n      java.util.HashMap.put(Object, Object) line: 619\n      sun.awt.AppContext.put(Object, Object) line: 598\n      sun.awt.AppContext.&lt;init&gt;(ThreadGroup) line: 240\n      sun.awt.SunToolkit.createNewAppContext(ThreadGroup) line: 282\n      sun.awt.AppContext.initMainAppContext() line: 260\n      sun.awt.AppContext.getAppContext() line: 295\n      sun.awt.SunToolkit.getSystemEventQueueImplPP() line: 1024\n      sun.awt.SunToolkit.getSystemEventQueueImpl() line: 1019\n      java.awt.Toolkit.getEventQueue() line: 1375\n      java.awt.EventQueue.invokeLater(Runnable) line: 1257\n      javax.swing.SwingUtilities.invokeLater(Runnable) line: 1415\n      java2d.J2Ddemo.main(String[]) line: 674\n    ]\n}<\/code><\/pre>\n<h3><a href=\"https:\/\/link.segmentfault.com\/?enc=AikbzsBxNVfK0HrVsX6ixQ%3D%3D.UiVx6YNUr%2FYVsKTp3GrQmSeSbC71c1uBijnqzxeGqYw%3D\" rel=\"nofollow noopener noreferrer\" target=\"_blank\">JEP 521: Generational Shenandoah<\/a><\/h3>\n<p>\u5728JDK24\u7684<a href=\"https:\/\/link.segmentfault.com\/?enc=fHc5aCdqBii1aa9Xvxq5bA%3D%3D.OwIWQbT77fBVNNHMSDWS7v3AIL4h4IgJqeK49oxNGwc%3D\" rel=\"nofollow noopener noreferrer\" target=\"_blank\">JEP 404: Generational Shenandoah (Experimental)<\/a>\u63d0\u4f9b\u4e86\u4e00\u4e2a\u5b9e\u9a8c\u6027\u7684\u5206\u4ee3\u6a21\u5f0f\uff0c\u4e0e\u5176\u4ed6\u5206\u4ee3\u6536\u96c6\u5668\u4e00\u6837\u5206\u4e3a\u5e74\u8f7b\u4ee3\u548c\u5e74\u8001\u4ee3<br \/>\u5728JDK25\u8f6c\u4e3a\u6b63\u5f0f\u7248\u672c\uff0c\u4e0d\u518d\u9700\u8981<code>-XX:+UnlockExperimentalVMOptions<\/code>\u547d\u4ee4<\/p>\n<pre><code>-XX:+UseShenandoahGC -XX:ShenandoahGCMode=generational<\/code><\/pre>\n<h2>\u7ec6\u9879\u89e3\u8bfb<\/h2>\n<p>\u4e0a\u9762\u5217\u51fa\u7684\u662f\u5927\u65b9\u9762\u7684\u7279\u6027\uff0c\u9664\u6b64\u4e4b\u5916\u8fd8\u6709\u4e00\u4e9bapi\u7684\u66f4\u65b0\u53ca\u5e9f\u5f03\uff0c\u4e3b\u8981\u89c1<a href=\"https:\/\/link.segmentfault.com\/?enc=qhccnDqdkSWtT%2Bykr1yqaA%3D%3D.uBYipMSOWeuBdn9gWkwZZRdMT1Gm078xJTBNa1V8cgB7A5imvSh9JP5cVQAnda6F\" rel=\"nofollow noopener noreferrer\" target=\"_blank\">JDK 25 Release Notes<\/a>\uff0c\u8fd9\u91cc\u4e3e\u51e0\u4e2a\u4f8b\u5b50\u3002<\/p>\n<h3>\u6dfb\u52a0\u9879<\/h3>\n<ul>\n<li>\n<p>Support for reading all remaining characters from a Reader (<a href=\"https:\/\/link.segmentfault.com\/?enc=y84PqEJUB6aDWb33iMBm%2FQ%3D%3D.%2FJzdbbIleJSo1BrcVC%2FbICHxbLpZfv5EidgZa%2Bd8nEdgoX9woI7CMA3e1C%2Bn9ZTY\" rel=\"nofollow noopener noreferrer\" target=\"_blank\">JDK-8354724<\/a>)<\/p>\n<blockquote><p>java.io.Reader\u65b0\u589e\u4e86\u65b9\u6cd5readAllAsString\u53ef\u4ee5\u8bfb\u53d6\u5269\u4f59\u5b57\u7b26\u5230String\uff0c\u65b0\u589ereadAllLines\u8bfb\u53d6\u5269\u4f59\u5b57\u7b26\u5230<code>List&lt;String&gt;<\/code><\/p><\/blockquote>\n<\/li>\n<li>\n<p>New connectionLabel Method in java.net.http.HttpResponse to Identify Connections (<a href=\"https:\/\/link.segmentfault.com\/?enc=0bGO%2Fe%2FFQuhrJAjQnaxSlg%3D%3D.OLLd3Uy%2FA6W64C6hzxZCPFCgOqJvoIGkqFZpFVJBKTPxuDT5BTOCCfgVc0rPNxN5\" rel=\"nofollow noopener noreferrer\" target=\"_blank\">JDK-8350279<\/a>)<\/p>\n<blockquote><p>\u5bf9HttpResponse\u65b0\u589e\u4e86connectionLabel\u65b9\u6cd5\u7528\u4e8e\u5173\u8054connection<\/p><\/blockquote>\n<\/li>\n<li>\n<p>New Property to Construct ZIP FileSystem as Read-only (<a href=\"https:\/\/link.segmentfault.com\/?enc=lIpe5mnSoDnwKFRV87be9Q%3D%3D.I3ie%2FekgLasT%2FJ1B96gfOBQT9Kldw7oYsSNPrAwGZyllYl9shoAC1lqJJRFihaXg\" rel=\"nofollow noopener noreferrer\" target=\"_blank\">JDK-8350880<\/a>)<\/p>\n<blockquote><p>\u65b0\u589ereadOnly\u652f\u6301FileSystems.newFileSystem(pathToZipFile, Map.of(&#8220;accessMode&#8221;,&#8221;readOnly&#8221;))<\/p><\/blockquote>\n<\/li>\n<li>\n<p>Updates to ForkJoinPool and CompletableFuture (<a href=\"https:\/\/link.segmentfault.com\/?enc=Z61ktx8cGUW3e%2B9haH84Ng%3D%3D.%2FZZa6RKbvMsCXKBU2Y%2Bsu03UoJimruMLuw5miU6BqTlilbROdnl2MKdCQh%2Fhe9mw\" rel=\"nofollow noopener noreferrer\" target=\"_blank\">JDK-8319447<\/a>)<\/p>\n<blockquote><p>ForkJoinPool\u505a\u4e86\u66f4\u65b0\u4ee5\u5b9e\u73b0ScheduledExecutorService\uff0c\u65b0\u589e\u4e86submitWithTimeout\u65b9\u6cd5\u652f\u6301timeout\u53c2\u6570<\/p><\/blockquote>\n<\/li>\n<li>\n<p>Thread Dumps Generated by HotSpotDiagnosticMXBean.dumpThreads and jcmd Thread.dump_to_file Updated to Include Lock Information (<a href=\"https:\/\/link.segmentfault.com\/?enc=OTvrpUqNIa3ae1gypEXUqw%3D%3D.XGnO%2FkmAPRDGEAKHbqoIQ%2BtnWSD2K8%2FWstZ%2Blwf0DFLSyXwBYtdR8Bg8OTete6zz\" rel=\"nofollow noopener noreferrer\" target=\"_blank\">JDK-8356870<\/a>)<\/p>\n<blockquote><p>com.sun.management.HotSpotDiagnosticMXBean.dumpThreads\u4ee5\u53cajcmd &lt;pid&gt; Thread.dump_to_file\u751f\u6210\u7684\u7ebf\u7a0b\u5806\u6808\u73b0\u5728\u5305\u542b\u4e86\u9501\u4fe1\u606f<\/p><\/blockquote>\n<\/li>\n<li>\n<p>G1 Reduces Remembered Set Overhead by Grouping Regions into Shared Card Sets (<a href=\"https:\/\/link.segmentfault.com\/?enc=Sy2teflNCQfsWeigPB698A%3D%3D.JtSiyK9Q3aAZB2xlRxmp97JvtY1hpQI2HTL6YkwzcpXDwLivUJi01yyQTg8WGnwq\" rel=\"nofollow noopener noreferrer\" target=\"_blank\">JDK-8343782<\/a>)<\/p>\n<blockquote><p>\u4ee5\u524d\u6bcf\u4e2aRegion\u90fd\u7ef4\u62a4\u81ea\u5df1\u7684G1CardSet\uff0c\u5bfc\u81f4\u5185\u5b58\u5360\u7528\u9ad8\uff0c\u65b0\u8bbe\u8ba1\u5728 Remark \u9636\u6bb5\u4e4b\u540e\uff0c\u628a\u9884\u8ba1\u4f1a\u4e00\u8d77\u88ab\u6e05\u7a7a\u7684Region\u5f52\u4e3a\u4e00\u7ec4\uff0c\u5e76\u5206\u914d\u540c\u4e00\u4e2a\u5171\u4eab\u7684G1CardSet\uff0c\u7701\u53bb\u4e86\u5b83\u4eec\u4e4b\u95f4\u9010\u4e00\u8ddf\u8e2a\u5f15\u7528\u7684\u5f00\u9500\u3002<\/p><\/blockquote>\n<\/li>\n<\/ul>\n<h3>\u79fb\u9664\u9879<\/h3>\n<ul>\n<li>\n<p>java.net.Socket Constructors Can No Longer Be Used to Create a Datagram Socket (<a href=\"https:\/\/link.segmentfault.com\/?enc=5VzWBrzl%2Bc5Pp9RihPsJzw%3D%3D.SzC9R%2BlmgocpMsbitS4EqnyZVtwzoOPc73S6q8V2%2BU6hG%2FPy1kTwC2%2FR11yG9wLQ\" rel=\"nofollow noopener noreferrer\" target=\"_blank\">JDK-8356154<\/a>)<\/p>\n<blockquote><p>java.net.Socket\u5e9f\u5f03\u4e86\u4e24\u4e2a\u6784\u9020\u5668\uff0c\u4e0d\u518d\u652f\u6301\u521b\u5efadatagram sockets\uff0c\u9700\u8981\u6539\u4e3ajava.net.DatagramSocket\u66ff\u4ee3<\/p><\/blockquote>\n<\/li>\n<li>\n<p>Removal of PerfData Sampling (<a href=\"https:\/\/link.segmentfault.com\/?enc=N6OZ%2B7FRJzqe1yLn9HeLzw%3D%3D.jSVlZTsNFjWcNjKSOkssS6%2BJjddhdcdhC2XQTwRryL8RkvSr9yXQWOCVbRn0Dizp\" rel=\"nofollow noopener noreferrer\" target=\"_blank\">JDK-8241678<\/a>)<\/p>\n<blockquote><p>-XX:PerfDataSamplingInterval\u8fd9\u4e2a\u88ab\u79fb\u9664\u4e86<\/p><\/blockquote>\n<\/li>\n<\/ul>\n<h3>\u5e9f\u5f03\u9879<\/h3>\n<ul>\n<li>\n<p>Deprecate the Use of java.locale.useOldISOCodes System Property (<a href=\"https:\/\/link.segmentfault.com\/?enc=6nWpUg3jejyY0dHvji9AxQ%3D%3D.%2Bug6H3bEDhq54sTxSFXu3wTSTDVS34yPzXtrd711awxI10NLU4ew5Rkpk2jTgWKe\" rel=\"nofollow noopener noreferrer\" target=\"_blank\">JDK-8353118<\/a>)<\/p>\n<blockquote><p>java.locale.useOldISOCodes\u8fd9\u4e2a\u5c5e\u6027\u88ab\u5e9f\u5f03\u4e86<\/p><\/blockquote>\n<\/li>\n<li>\n<p>The UseCompressedClassPointers Option is Deprecated (<a href=\"https:\/\/link.segmentfault.com\/?enc=%2FkH4TwwY2ahF279cQNiLqg%3D%3D.PCkFtNyEtjjAaWqSp3LQIKya0VYbFVuHTjl%2F98xX2jxAA5b4IG4TIlv8FAYrlymY\" rel=\"nofollow noopener noreferrer\" target=\"_blank\">JDK-8350753<\/a>)<\/p>\n<blockquote><p>UseCompressedClassPointers\u8fd9\u4e2a\u53c2\u6570\u88ab\u5e9f\u5f03\u4e86\uff0c\u63a5\u4e0b\u6765\u5c06\u9ed8\u8ba4\u5f00\u542f\u538b\u7f29\u7c7b\u6307\u9488<\/p><\/blockquote>\n<\/li>\n<li>\n<p>Various Permission Classes Deprecated for Removal (JDK-8348967, JDK-8353641, JDK-8353642, JDK-8353856, JDK-8347985, JDK-8351224, JDK-8351310)<br \/>\u4ee5\u4e0b\u8fd9\u4e9bPermission\u76f8\u5173\u7684\u7c7b\u88ab\u6807\u8bb0\u5e9f\u5f03<\/p>\n<pre><code>java.security.UnresolvedPermission\njavax.net.ssl.SSLPermission\njavax.security.auth.AuthPermission\njavax.security.auth.PrivateCredentialPermission\njavax.security.auth.kerberos.DelegationPermission\njavax.security.auth.kerberos.ServicePermission\ncom.sun.security.jgss.InquireSecContextPermission\njava.lang.RuntimePermission\njava.lang.reflect.ReflectPermission\njava.io.FilePermission\njava.io.SerializablePermission\njava.nio.file.LinkPermission\njava.util.logging.LoggingPermission\njava.util.PropertyPermission\njdk.jfr.FlightRecorderPermission\njava.net.NetPermission\njava.net.URLPermission\njdk.net.NetworkPermission\ncom.sun.tools.attach.AttachPermission\ncom.sun.jdi.JDIPermission\njava.lang.management.ManagementPermission\njavax.management.MBeanPermission\njavax.management.MBeanTrustPermission\njavax.management.MBeanServerPermission\njavax.management.remote.SubjectDelegationPermission<\/code><\/pre>\n<\/li>\n<\/ul>\n<h3>\u5df2\u77e5\u95ee\u9898\u4fee\u590d<\/h3>\n<ul>\n<li>\n<p>ZGC Now Avoids String Deduplication for Short-Lived Strings (<a href=\"https:\/\/link.segmentfault.com\/?enc=gQLdYPuc%2BBKHT8Pr9QK0tQ%3D%3D.p%2FjJmSx9tdLEhMaP7DBrACiB8dqFkO7IUj14WQOvzKB4fYfyk3OCGMT7dSc6Uzvz\" rel=\"nofollow noopener noreferrer\" target=\"_blank\">JDK-8347337<\/a>)<\/p>\n<blockquote><p>ZGC\u5c06\u907f\u514d\u5bf9\u4e00\u4e9b\u751f\u547d\u5468\u671f\u77ed\u7684String\u8fdb\u884cDeduplication\uff0c\u907f\u514d\u4e0d\u5fc5\u8981\u7684\u5f00\u9500<\/p><\/blockquote>\n<\/li>\n<li>\n<p>G1 Reduces Pause Time Spikes by Improving Region Selection (<a href=\"https:\/\/link.segmentfault.com\/?enc=urh7ZG%2F41%2BnCFHABvRcUgw%3D%3D.0DgZsfZV4Aq%2BACHq4MQQ3xm7Lldkybt5kg51qOS64Uez%2BsRKNPq51ALyWxhnOzIG\" rel=\"nofollow noopener noreferrer\" target=\"_blank\">JDK-8351405<\/a>)<\/p>\n<blockquote><p>G1\u5728Mixed GC\u7684\u65f6\u5019\u4f1a\u5f15\u8d77pause time\u98d9\u5347\uff0c\u6b64\u6b21\u901a\u8fc7region\u9009\u62e9\u8fdb\u884c\u4e86\u4f18\u5316<\/p><\/blockquote>\n<\/li>\n<li>\n<p>No More OutOfMemoryErrors Due to JNI in Serial\/Parallel GC (<a href=\"https:\/\/link.segmentfault.com\/?enc=%2FYrKI463Lg8q2wd5D3JvUA%3D%3D.u8xSqixCj%2BVnj5LE5cqrHdjRNVHW9re1nMDJtDvkThI%2FmgEld3s%2FvLIPHrii7PY%2F\" rel=\"nofollow noopener noreferrer\" target=\"_blank\">JDK-8192647<\/a>)<\/p>\n<blockquote><p>\u4fee\u590d\u4e86Serial\/Parallel GC\u56e0\u4e3aJNI\u5bfc\u81f4\u7684OOM<\/p><\/blockquote>\n<\/li>\n<\/ul>\n<h3>\u5df2\u77e5\u95ee\u9898<\/h3>\n<ul>\n<li>Regression in Serialization of LocalDate Class Objects (<a href=\"https:\/\/link.segmentfault.com\/?enc=tsjGWHnbpeNZOFPiWzIc4A%3D%3D.zyPfZdbg5xGgVQOAnq8f%2BHwCPKvvaeDsvyJDoF9z5AoLuIPYb%2F1d4K5Z4NsWQKcm\" rel=\"nofollow noopener noreferrer\" target=\"_blank\">JDK-8367031<\/a>)<br \/>\u5728 java.time \u5305\u4e2d\uff0c\u82e5\u5e72\u7c7b\u7684\u5e8f\u5217\u5316 Class \u5bf9\u8c61\u5728 JDK 25 \u4e0e\u65e9\u671f\u7248\u672c\u4e4b\u95f4\u4e0d\u518d\u517c\u5bb9\u3002\u53d7\u5f71\u54cd\u7684\u5177\u4f53\u7c7b\u5305\u62ec\uff1aLocalDate\u3001YearMonth\u3001MonthDay\u3001HijrahDate<br \/>\u517c\u5bb9\u6027\u89c4\u5219\uff1a\u5982\u679c\u628a\u4e0a\u8ff0\u67d0\u4e2a\u7c7b\u7684Class\u5bf9\u8c61\u5728\u65e9\u671f\u7248\u672c\u5e8f\u5217\u5316\uff0c\u518d\u5230 JDK 25 \u53cd\u5e8f\u5217\u5316\uff0c\u6216\u8005\u53cd\u5411\u64cd\u4f5c\uff0c\u90fd\u4f1a\u629b\u51fa InvalidClassException\uff0c\u4f8b\u5982<code>writeObject(LocalDate.class)<\/code><br \/>\u4f46\u5982\u679c\u662f\u5e8f\u5217\u5316\u5b9e\u4f8b\uff0c\u5219\u4e0d\u53d7\u5f71\u54cd<code>writeObject(LocalDate.now())<\/code><\/li>\n<li>\n<p>Performance Regression in java.lang.ClassValue::get (<a href=\"https:\/\/link.segmentfault.com\/?enc=5Cj0BaNSZgYwNJhqsB%2Bchg%3D%3D.uPMYozjsbDn1MAxUgi1id0HZiCgqLWEHDS%2BfX0ODf2a%2BDMmulrHJlidZWlHjsHZM\" rel=\"nofollow noopener noreferrer\" target=\"_blank\">JDK-8358535<\/a>)<br \/>\u5728 JDK 25 \u4e2d\uff0c\u4e3a\u4e86\u589e\u5f3a ClassValue \u5728\u5404\u79cd\u5e76\u53d1\u573a\u666f\u4e0b\u7684\u5065\u58ee\u6027\uff0cJDK-8351996 \u5bf9\u5176\u8fdb\u884c\u4e86\u66f4\u65b0\u3002<br \/>\u7136\u800c\uff0c\u8fd9\u6b21\u6539\u52a8\u5bfc\u81f4\uff1a\u5728\u8c03\u7528 ClassValue.remove \u4e4b\u540e\uff0cClassValue.get \u7684\u6267\u884c\u901f\u5ea6\u660e\u663e\u53d8\u6162\u3002<\/p>\n<ul>\n<li>\u5927\u591a\u6570\u5e94\u7528\u4e0d\u4f1a\u76f4\u63a5\u4f7f\u7528 ClassValue\uff0c\u56e0\u6b64\u4e0d\u4f1a\u611f\u77e5\u5230\u8fd9\u4e00\u9000\u5316\u3002<\/li>\n<li>\u4f46\u82e5\u67d0\u4e2a\u5e93\u540c\u65f6\u8c03\u7528 ClassValue.get \u4e0e remove\uff08\u4f8b\u5982 Scala 2.12 \u7684\u6807\u51c6\u5e93\uff09\uff0c\u5c31\u53ef\u80fd\u53d7\u5230\u6027\u80fd\u5f71\u54cd\u3002<\/li>\n<\/ul>\n<p>\u8be5\u6027\u80fd\u56de\u9000\u5df2\u5728 JDK-8358535 \u4e2d\u88ab\u4fee\u590d\u3002<\/p>\n<\/li>\n<li>\n<p>-XX:+UseTransparentHugePages Fails to Enable Huge Pages for G1 (<a href=\"https:\/\/link.segmentfault.com\/?enc=KuEoDrFBMmflFlWjfANtfg%3D%3D.Qfe7%2FJJdA4IZkJ9RpD8s4BAANqba%2FRH%2FWRrHoO9V8g2fE2lz%2Bqc4REwUlm%2BYPJGK\" rel=\"nofollow noopener noreferrer\" target=\"_blank\">JDK-8366434<\/a>)<br \/>\u5728\u628aTransparent Huge Pages\uff08THP\uff09\u6a21\u5f0f\u8bbe\u7f6e\u4e3a madvise \u7684\u7cfb\u7edf\u4e0a\uff0c<br \/>\u5373\u4f7f\u542f\u52a8\u53c2\u6570\u91cc\u52a0\u4e86 -XX:+UseTransparentHugePages\uff0c\u9ed8\u8ba4\u5783\u573e\u56de\u6536\u5668 G1 \u4e5f\u4e0d\u4f1a\u5b9e\u9645\u542f\u7528\u5927\u9875\u3002\u4e34\u65f6\u89e3\u51b3\u529e\u6cd5\uff1a\u628a THP \u6a21\u5f0f\u6539\u6210 always\uff0c\u5373\u53ef\u8ba9 G1 \u6b63\u5e38\u4f7f\u7528Transparent Huge Pages\uff1a<\/p>\n<pre><code># echo always &gt; \/sys\/kernel\/mm\/transparent_hugepage\/enabled<\/code><\/pre>\n<h3>\u5176\u4ed6\u4e8b\u9879<\/h3>\n<\/li>\n<li>Disabled SHA-1 in TLS 1.2 and DTLS 1.2 Handshake Signatures (<a href=\"https:\/\/link.segmentfault.com\/?enc=hUVbkUJd1NBBSMZ%2BqeivwA%3D%3D.8W6COa1kP3dIQr8d4hgLaeYxMVUR%2B5AQk7izQ19eF593pmcOrb2Jb4nXxlx2RCMj\" rel=\"nofollow noopener noreferrer\" target=\"_blank\">JDK-8340321<\/a>)<\/li>\n<li>Compact Object Headers CDS Archive Generation and jlink Instruction (<a href=\"https:\/\/link.segmentfault.com\/?enc=oV55cFGotzaej9BeiswFCg%3D%3D.hqIoboePllbxPcZG662VcAwsz8AlV7Y8iZAHPQ0V2EUhfNkMM2OFVthNpyxIL7OC\" rel=\"nofollow noopener noreferrer\" target=\"_blank\">JDK-8350457<\/a>)<\/li>\n<\/ul>\n<h2>\u5c0f\u7ed3<\/h2>\n<p>Java25\u4e3b\u8981\u6709\u5982\u4e0b\u51e0\u4e2a\u7279\u6027\uff0c\u5176\u4e2d\u6838\u5fc3\u5e93\u6539\u52a8\u6709JEP 502\u3001JEP 505\u3001JEP 506\u3001JEP 508\uff0c\u8bed\u8a00\u89c4\u8303\u7c7b\u7684\u6709JEP507\u3001JEP 511\u3001JEP 512\u3001JEP 513\u3002<\/p>\n<ul>\n<li><a href=\"https:\/\/link.segmentfault.com\/?enc=b%2FEe22Q%2FARBKSgfx5Y9ReA%3D%3D.2XSnuqwpTuqyr56BuUmCANM%2FkmmQzdwpeg8HQBtQrLo%3D\" rel=\"nofollow noopener noreferrer\" target=\"_blank\">JEP 470: PEM Encodings of Cryptographic Objects (Preview)<\/a><\/li>\n<li><a href=\"https:\/\/link.segmentfault.com\/?enc=weZpwFP0YZf7sRwOHXUfDA%3D%3D.qlZrS8hIBuyUk%2BZY3iDNlM%2Btm0EZ2cn3AN%2FLyFegiZs%3D\" rel=\"nofollow noopener noreferrer\" target=\"_blank\">JEP 502: Stable Values (Preview)<\/a><\/li>\n<li><a href=\"https:\/\/link.segmentfault.com\/?enc=kN4h2GnA1qg3x%2FDulzHCWg%3D%3D.98Svr5GqGaf0lXcmleJ%2BTzsQws9TpIeRbGK6BZyl%2FpA%3D\" rel=\"nofollow noopener noreferrer\" target=\"_blank\">JEP 503: Remove the 32-bit x86 Port<\/a><\/li>\n<li><a href=\"https:\/\/link.segmentfault.com\/?enc=yuplFlnig7YXIz6odllJ9w%3D%3D.b%2Bs70wXoqToh5QrbkCMsAZGelqTxfKN89wWrciwOcMY%3D\" rel=\"nofollow noopener noreferrer\" target=\"_blank\">JEP 505: Structured Concurrency (Fifth Preview)<\/a><\/li>\n<li><a href=\"https:\/\/link.segmentfault.com\/?enc=BSz7vo%2BGRq%2BS8UnKopuU1Q%3D%3D.%2Fv%2FhZTXVnlbOoZetUr0PHfrwWag%2F58dNsGnOGF30paA%3D\" rel=\"nofollow noopener noreferrer\" target=\"_blank\">JEP 506: Scoped Values<\/a><\/li>\n<li><a href=\"https:\/\/link.segmentfault.com\/?enc=YqGUgNcyQai9kXTSPtq6lA%3D%3D.Nv%2BjiZJH2AtdcEvQcme9rNWCKPeV1v4Oqrw0onPamIE%3D\" rel=\"nofollow noopener noreferrer\" target=\"_blank\">JEP 507: Primitive Types in Patterns, instanceof, and switch (Third Preview)<\/a><\/li>\n<li><a href=\"https:\/\/link.segmentfault.com\/?enc=AG5ezU%2BCBnGUH95qcGO3cQ%3D%3D.cPlJIx%2B23U0TQ5%2FdmsohCUVzrhcMZT1XvnikGWD2M2c%3D\" rel=\"nofollow noopener noreferrer\" target=\"_blank\">JEP 508: Vector API (Tenth Incubator)<\/a><\/li>\n<li><a href=\"https:\/\/link.segmentfault.com\/?enc=JN3Ywzk5o8lMnasB2zHHHw%3D%3D.Yav7Vsc331%2BNLO9DWAm62BhGIqivwQNevTcncmegDdA%3D\" rel=\"nofollow noopener noreferrer\" target=\"_blank\">JEP 509: JFR CPU-Time Profiling (Experimental)<\/a><\/li>\n<li><a href=\"https:\/\/link.segmentfault.com\/?enc=e3zK1DLQt7JjsbcvwlxzlQ%3D%3D.f0HrK7UXb%2F6iYnk169CRuB2DnN7DQNH936HqJopS9tg%3D\" rel=\"nofollow noopener noreferrer\" target=\"_blank\">JEP 510: Key Derivation Function API<\/a><\/li>\n<li><a href=\"https:\/\/link.segmentfault.com\/?enc=aOJGBgWCxOKhSvDop89uDw%3D%3D.2xBekj9nZzInwNSkiZ%2BMPYtVoI0AQD6tV8LPpfE1ORM%3D\" rel=\"nofollow noopener noreferrer\" target=\"_blank\">JEP 511: Module Import Declarations<\/a><\/li>\n<li><a href=\"https:\/\/link.segmentfault.com\/?enc=bznxLrVYxvIYXaPXug21Uw%3D%3D.7%2F4y68wE6WQTx4yg2j3AjIgQSG1NOAt7EjUTF%2BHL9Xg%3D\" rel=\"nofollow noopener noreferrer\" target=\"_blank\">JEP 512: Compact Source Files and Instance Main Methods<\/a><\/li>\n<li><a href=\"https:\/\/link.segmentfault.com\/?enc=UyadlU5l5P3xAL3tiRxwuQ%3D%3D.3YxveHKebLsr0VX0Q0irPU%2B8g4db2T4M0CFOdEqZcDc%3D\" rel=\"nofollow noopener noreferrer\" target=\"_blank\">JEP 513: Flexible Constructor Bodies<\/a><\/li>\n<li><a href=\"https:\/\/link.segmentfault.com\/?enc=NaFmPtaumL7FQvbMq7rIMQ%3D%3D.QCftRHWGBGa3G0OQtAliRh5coaN%2BVO8%2FC%2BWVmrjWzlY%3D\" rel=\"nofollow noopener noreferrer\" target=\"_blank\">JEP 514: Ahead-of-Time Command-Line Ergonomics<\/a><\/li>\n<li><a href=\"https:\/\/link.segmentfault.com\/?enc=Z4arFN2T6j%2BOo0x0E%2BYLrQ%3D%3D.Rj0NHVQTH5qLdcG7l9U%2B2IKuKxlAMlCStoJu119pkCE%3D\" rel=\"nofollow noopener noreferrer\" target=\"_blank\">JEP 515: Ahead-of-Time Method Profiling<\/a><\/li>\n<li><a href=\"https:\/\/link.segmentfault.com\/?enc=OM%2F3A55xdTQh1s4sPcSrOQ%3D%3D.tCVXU4KUYMInBwaMjygdr1rR1ow0Ut6kibzxiG8YXnc%3D\" rel=\"nofollow noopener noreferrer\" target=\"_blank\">JEP 518: JFR Cooperative Sampling<\/a><\/li>\n<li><a href=\"https:\/\/link.segmentfault.com\/?enc=rW9boW%2F97i4D%2BJxcszC%2Fjw%3D%3D.jsVBMU6QsYGPv5dRpEGZg%2Ftaig7PuzBHmGakhOnYGjA%3D\" rel=\"nofollow noopener noreferrer\" target=\"_blank\">JEP 519: Compact Object Headers<\/a><\/li>\n<li><a href=\"https:\/\/link.segmentfault.com\/?enc=mvUBxSreo%2BrVAxCQLdsOsQ%3D%3D.LnUXwVObTqazo%2FHN%2Fl15kplplFDmrjwfxRYWMhHLenA%3D\" rel=\"nofollow noopener noreferrer\" target=\"_blank\">JEP 520: JFR Method Timing &#038; Tracing<\/a><\/li>\n<li><a href=\"https:\/\/link.segmentfault.com\/?enc=GnZHlq%2B1cGeRTxNXztIPfg%3D%3D.g4fuOSicBhcdwfhgTTI21AtkEOhwzHSV%2FZPHp1wjp8c%3D\" rel=\"nofollow noopener noreferrer\" target=\"_blank\">JEP 521: Generational Shenandoah<\/a><\/li>\n<\/ul>\n<blockquote>\n<p>\u6b64\u6b21\u53d1\u5e03\u4e8618\u4e2aJEP\uff0c\u6574\u4f53\u6982\u62ec\u5982\u4e0b\uff1a<\/p>\n<p>| JEP | Title | Status | Project | Feature Type | Changes since Java 24 |<\/p>\n<\/blockquote>\n<table>\n<tbody>\n<tr>\n<td>470<\/td>\n<td>PEM Encodings of Cryptographic Objects<\/td>\n<td>Preview<\/td>\n<td>Security Libs<\/td>\n<td>Security<\/td>\n<td>New feature<\/td>\n<\/tr>\n<tr>\n<td>502<\/td>\n<td>Stable Values<\/td>\n<td>Preview<\/td>\n<td>Core Libs<\/td>\n<td>New API<\/td>\n<td>New feature<\/td>\n<\/tr>\n<tr>\n<td>503<\/td>\n<td>Remove the 32-bit x86 Port<\/td>\n<td> <\/td>\n<td>HotSpot<\/td>\n<td>Deprecation<\/td>\n<td>Removal<\/td>\n<\/tr>\n<tr>\n<td>505<\/td>\n<td>Structured Concurrency<\/td>\n<td>Fifth Preview<\/td>\n<td>Loom<\/td>\n<td>Concurrency<\/td>\n<td>Major<\/td>\n<\/tr>\n<tr>\n<td>506<\/td>\n<td>Scoped Values<\/td>\n<td> <\/td>\n<td>Loom<\/td>\n<td>Concurrency<\/td>\n<td>Minor<\/td>\n<\/tr>\n<tr>\n<td>507<\/td>\n<td>Primitive Types in Patterns, instanceof, and switch<\/td>\n<td>Third Preview<\/td>\n<td>Amber<\/td>\n<td>Language<\/td>\n<td>None<\/td>\n<\/tr>\n<tr>\n<td>508<\/td>\n<td>Vector API<\/td>\n<td>Tenth Incubator<\/td>\n<td>Panama<\/td>\n<td>New API<\/td>\n<td>Minor<\/td>\n<\/tr>\n<tr>\n<td>509<\/td>\n<td>JFR CPU-Time Profiling<\/td>\n<td>Experimental<\/td>\n<td>HotSpot \/ JFR<\/td>\n<td>Profiling<\/td>\n<td>New feature<\/td>\n<\/tr>\n<tr>\n<td>510<\/td>\n<td>Key Derivation Function API<\/td>\n<td> <\/td>\n<td>Security Libs<\/td>\n<td>Security<\/td>\n<td>None<\/td>\n<\/tr>\n<tr>\n<td>511<\/td>\n<td>Module Import Declarations<\/td>\n<td> <\/td>\n<td>Amber<\/td>\n<td>Language<\/td>\n<td>None<\/td>\n<\/tr>\n<tr>\n<td>512<\/td>\n<td>Compact Source Files and Instance Main Methods<\/td>\n<td> <\/td>\n<td>Amber<\/td>\n<td>Language<\/td>\n<td>Major<\/td>\n<\/tr>\n<tr>\n<td>513<\/td>\n<td>Flexible Constructor Bodies<\/td>\n<td> <\/td>\n<td>Amber<\/td>\n<td>Language<\/td>\n<td>None<\/td>\n<\/tr>\n<tr>\n<td>514<\/td>\n<td>Ahead-of-Time Command-Line Ergonomics<\/td>\n<td> <\/td>\n<td>Leyden<\/td>\n<td>Performance<\/td>\n<td>New feature<\/td>\n<\/tr>\n<tr>\n<td>515<\/td>\n<td>Ahead-of-Time Method Profiling<\/td>\n<td> <\/td>\n<td>Leyden<\/td>\n<td>Performance<\/td>\n<td>New feature<\/td>\n<\/tr>\n<tr>\n<td>518<\/td>\n<td>JFR Cooperative Sampling<\/td>\n<td> <\/td>\n<td>HotSpot \/ JFR<\/td>\n<td>Profiling<\/td>\n<td>New feature<\/td>\n<\/tr>\n<tr>\n<td>519<\/td>\n<td>Compact Object Headers<\/td>\n<td> <\/td>\n<td>HotSpot<\/td>\n<td>Performance<\/td>\n<td>None<\/td>\n<\/tr>\n<tr>\n<td>520<\/td>\n<td>JFR Method Timing &#038; Tracing<\/td>\n<td> <\/td>\n<td>HotSpot \/ JFR<\/td>\n<td>Profiling<\/td>\n<td>New feature<\/td>\n<\/tr>\n<tr>\n<td>521<\/td>\n<td>Generational Shenandoah<\/td>\n<td> <\/td>\n<td>HotSpot \/ GC<\/td>\n<td>Performance<\/td>\n<td>Stability and performance improvements<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2>doc<\/h2>\n<ul>\n<li><a href=\"https:\/\/link.segmentfault.com\/?enc=mC0BwTcTRU2xPLZCppnwkg%3D%3D.ZAgQzoMqnirfaLsyArOLQflFnZONTzc2WFbbrsl3Uio8YKDvP0rqfoU7Zz2Ymq4j\" rel=\"nofollow noopener noreferrer\" target=\"_blank\">JDK 25 Features<\/a><\/li>\n<li><a href=\"https:\/\/link.segmentfault.com\/?enc=vr6byAnnWHpZlSjAUo9KeA%3D%3D.umjeDeR0VVEhkdvsEcMG%2Bm0Wds0bIciMKpKv4HfDrr8MtznuiRDoipa1YXv7FIJ%2B\" rel=\"nofollow noopener noreferrer\" target=\"_blank\">JDK 25 Release Notes<\/a><\/li>\n<li><a href=\"https:\/\/link.segmentfault.com\/?enc=pVn70HWkfRqy1IimPFR6Sg%3D%3D.bJ8IBNj0k0B0Cvz9ZPXz2vhlguVK9LNCmwHsyDfuRJ8%2Fppc6DQllVBecl%2FZgWax4SM9wIkQGeoKZnw6rCnSnMPBLhiBhDTOyjySmcDfItgs%3D\" rel=\"nofollow noopener noreferrer\" target=\"_blank\">Consolidated JDK 25 Release Notes<\/a><\/li>\n<li><a href=\"https:\/\/link.segmentfault.com\/?enc=2jaga5AuZoc2MEJEExkCLQ%3D%3D.gjzTVpIXPxe8vWxFvDzNAG1Km9P7NZIMKDpBRJV9XHAMa%2Bk5ZZKEh4afwZXJF%2BeisXqhCYu%2FFWGdF39V26B9INE0t1x9B3L4%2BMdUMJ82IW8%3D\" rel=\"nofollow noopener noreferrer\" target=\"_blank\">Java SE 25 deprecated-list<\/a><\/li>\n<li><a href=\"https:\/\/link.segmentfault.com\/?enc=b39p9%2BJhPwvCwqtShF%2FOag%3D%3D.Jeza19lY8o0x1d%2BHqsTz4qq%2BM%2B4GMO%2FByivlbSh4Okl8WQi8G1%2FhrPIK2HVWoZoqsm%2FUYkFpTSM9n%2Bd8fE%2BsXw%3D%3D\" rel=\"nofollow noopener noreferrer\" target=\"_blank\">The Arrival of Java 25<\/a><\/li>\n<li><a href=\"https:\/\/link.segmentfault.com\/?enc=W4VhCUHx0u22Gz4fFB340Q%3D%3D.AHeYRIP1%2FVDsJsgWIRkmgzT8w9oAJw49wQzqJLD4xK7ALKDvxTwYn95nwpoeK%2FSl4ZaC%2FwQf2f0gl56z0gFOkg%3D%3D\" rel=\"nofollow noopener noreferrer\" target=\"_blank\">Java 25, the Next LTS Release, Delivers Finalized Features and Focus on Performance and Runtime<\/a><\/li>\n<li><a href=\"https:\/\/link.segmentfault.com\/?enc=M5kGTAJ7LDPal8FfpV1CUg%3D%3D.pNUxRIxK%2BXHN9XlI9iek5pKSqq5Gf1pIkO767197PzJylAYYtNlV8bz48aCL9sWBS7uJwGhXjZdvF8p%2Fy4XgjA%3D%3D\" rel=\"nofollow noopener noreferrer\" target=\"_blank\">JDK 25 and JDK 26: What We Know So Far<\/a><\/li>\n<li><a href=\"https:\/\/link.segmentfault.com\/?enc=tJhQV3OeW1ENzfYW4ijhYA%3D%3D.m2NgSjUF1dLd6TOf2z86PRTZ8EUl1EjFhkYZ%2Fy4rF9o%3D\" rel=\"nofollow noopener noreferrer\" target=\"_blank\">The Java Version Almanac Java25<\/a><\/li>\n<li><a href=\"https:\/\/link.segmentfault.com\/?enc=ZvrvPwBidv9lfGod%2BIVJuA%3D%3D.DZ0vt6vnOc%2Bqhh2sYU9BiE8qUzS0MppRgvBjBK1thucSUwNH%2BTWLo6erYnlBumnVtO3yh3n4rY9Ic3XLPFW06CSeGIFKurFa9FVIf4E1Cf0%3D\" rel=\"nofollow noopener noreferrer\" target=\"_blank\">Here\u2019s Java 25, Ready to Perform to the Limit<\/a><\/li>\n<li><a href=\"https:\/\/link.segmentfault.com\/?enc=GQWsecEYqYozJG9go2fUFA%3D%3D.NrBglV4XvIICR9WowbDcHHiRYuV1W20HqlgDSv30BXnxQrh0Dea1vwA2ztSwBdPBr%2FKi2JsT9yAlgB%2BtoYpJSRtNY8yL7UKwZMCLXoKAvHmcOVNggT2Vn2KcoYsX1Q4r\" rel=\"nofollow noopener noreferrer\" target=\"_blank\">What&#8217;s New in Project Leyden &#8211; JEP 514 and JEP 515 Explained<\/a><\/li>\n<\/ul>\n<p><a href=\"https:\/\/segmentfault.com\/a\/1190000047270683\">https:\/\/segmentfault.com\/a\/1190000047270683<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Java\u8bed\u8a00\u7279\u6027\u7cfb\u5217 Java5\u7684\u65b0\u7279\u6027 Java6\u7684\u65b0\u7279\u6027 Java7\u7684\u65b0\u7279\u6027 Java8\u7684\u65b0\u7279\u6027 Java [&hellip;]<\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[4],"tags":[],"class_list":["post-10021005","post","type-post","status-publish","format-standard","hentry","category-share"],"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/itmax.cn\/index.php?rest_route=\/wp\/v2\/posts\/10021005","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/itmax.cn\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/itmax.cn\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/itmax.cn\/index.php?rest_route=\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/itmax.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=10021005"}],"version-history":[{"count":0,"href":"https:\/\/itmax.cn\/index.php?rest_route=\/wp\/v2\/posts\/10021005\/revisions"}],"wp:attachment":[{"href":"https:\/\/itmax.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=10021005"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/itmax.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=10021005"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/itmax.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=10021005"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}