Java 22 发布
Java 22 Released

原始链接: https://mail.openjdk.org/pipermail/jdk-dev/2024-March/008827.html

Java 的最新版本 JDK 22 已宣布全面可用 (GA)。 这意味着它在经过全面测试后已正式发布并可供生产使用。 通过提供的链接,可以访问 Oracle 的 JDK 的开源 GNU 公共许可证版本。 该版本由 12 个 JEP(Java 增强提案)组成,其中包括功能改进,例如 G1 的区域固定、“super()”之前的语句、外部函数和内存 API、未命名变量和模式等。 此外,它还包含许多较小的增强功能和数千个错误修复。 非常感谢所有通过设计、实施、错误修复或只是下载和测试其早期访问版本为该版本做出贡献的人们。 欲了解更多详情,请访问 https://openjdk.org/projects/jdk/22/。

苹果已经针对这个特定问题发布了补丁,但需要更新整个操作系统。 建议用户尽快更新,以确保系统安全。 如果您在更新后遇到 USB 设备问题,您可能需要查阅设备制造商的文档或联系他们的支持人员以获取指导。 关于 Java:有多种方法可以解析命令行参数,具体取决于所需的灵活性和便利程度。 以下是一些流行选项的简要概述: 1. 使用标准 Java argparse:此方法涉及手动检查各个参数并处理验证和错误报告。 虽然简单,但与其他解决方案相比,它的灵活性和可维护性较差。 对于较小的项目或主要关注功能的项目,此方法就足够了。 2. 使用第三方库:OptionsParser 和 PosixParser 是流行的替代方案,提供附加功能和易用性。 这些库抽象了解析参数的过程,允许通过易于理解的 API 和方便的使用示例进行定制和配置。 3. 使用 Groovy、Bash 或 PowerShell 等高级脚本语言:通过集成脚本引擎和库,可以将参数解析卸载到这些替代环境中,从而提高脚本的可读性和多功能性。 最终,该决定取决于项目规模、所需的控制、首选的开发风格以及对不同方法的熟悉程度等因素。 总而言之,每个选项都有其权衡,选择理想的解决方案需要根据项目需求和个人喜好仔细考虑。
相关文章

原文
Mark Reinhold mark.reinhold at oracle.com
Tue Mar 19 13:20:07 UTC 2024
JDK 22, the reference implementation of Java 22, is now Generally
Available.  We shipped build 36 as the second Release Candidate of
JDK 22 on 16 February, and no P1 bugs have been reported since then.
Build 36 is therefore now the GA build, ready for production use.

GPL-licensed OpenJDK builds from Oracle are available here:

  https://jdk.java.net/22

Builds from other vendors will no doubt be available soon.

This release includes twelve JEPs [1], including the final versions of
the Foreign Function & Memory API (454) and Unnamed Variables & Patterns
(456):

  423: Region Pinning for G1
  447: Statements before super(...) (Preview)
  454: Foreign Function & Memory API
  456: Unnamed Variables & Patterns
  457: Class-File API (Preview)
  458: Launch Multi-File Source-Code Programs
  459: String Templates (Second Preview)
  460: Vector API (Seventh Incubator)
  461: Stream Gatherers (Preview)
  462: Structured Concurrency (Second Preview)
  463: Implicitly Declared Classes and Instance Main Methods (Second Preview)
  464: Scoped Values (Second Preview)

This release also includes, as usual, hundreds of smaller enhancements
and thousands of bug fixes.

Thank you to everyone who contributed this release, whether by designing
and implementing features or enhancements, by fixing bugs, or by
downloading and testing the early-access builds!

- Mark


[1] https://openjdk.org/projects/jdk/22/


More information about the jdk-dev mailing list
联系我们 contact @ memedata.com