构建文档:Building the JDK,如果无法自动探测 boot JDK 则需要在 configure 时指定 --with-boot-jdk
,如果构建后需要运行测试,则需要在 configure 时指定 --with-jtreg
和 --with-gtest
,示例如下:
1 | bash configure --with-boot-jdk=/usr/local/Cellar/openjdk/19 --with-jtreg=/Users/tianshuang/Public/jtreg --with-gtest=/Users/tianshuang/Public/googletest-release-1.8.1 |
注意若在 macOS 上因函数废弃导致无法构建,则降级 Xcode 版本即可,即不要使用 App Store 中的 Xcode,而是从 Apple - Deleloper - Download 中下载低版本的 Xcode 安装后再尝试构建。经测试,使用 Xcode 13 能够构建 master 分支(截止至 2022-11-12)上的 JDK。