mac 编译 openjdk11

  1. 下载 openjdk 镜像
hg clone https://hg.openjdk.java.net/jdk/jdk11/

或者在 http://jdk.java.net/下载

  1. 下载前置依赖
brew install FreeType
brew install Autoconf
  1. 执行 configure 检查
bash ./configure --with-target-bits=64 --enable-ccache --with-jvm-variants=server --enable-dtrace --with-boot-jdk-jvmargs="-Xlint:deprecation -Xlint:unchecked" --disable-warnings-as-errors --with-debug-level=slowdebug 2>&1 | tee configure_mac_x64.log
# ./configure 是用来检测你的安装平台的目标特征的。比如它会检测你是不是有CC或GCC,并不是需要CC或GCC,它是个shell脚本
# make 是用来编译的,它从Makefile中读取指令,然后编译
# make install 是用来安装的,它也从Makefile中读取指令,安装到指定的位置
# --with-debug-level=slowdebug 启用slowdebug级别调试
# --enable-dtrace 启用dtrace
# --with-jvm-variants=server 编译server类型JVM
# --with-target-bits=64 指定JVM为64位
# --enable-ccache 启用ccache,加快编译
# --disable-warnings-as-errors 忽略警告
  1. 编译
make images
发布了778 篇原创文章 · 获赞 323 · 访问量 209万+

猜你喜欢

转载自blog.csdn.net/lgh1992314/article/details/104459927