【Java】macOS下编译JDK8
安装mercurial brew install mercurial 下载源码 1234 hg clone http://hg.openjdk.java.net/jdk8/jdk8 java-sourcecd java-sourcechmod +x get_source.sh./get_source.sh 安装依赖 brew install freetype 修改源代码 1. 修改relocInfo.hpp的367行(hotspot/src/share/vm/code/relocInfo.hpp) 修改前: 1 inline friend relocInfo prefix_relocInfo(int datalen=0); 修改后: 1 inline friend relocInfo prefix_relocInfo(int datalen); 2. 修改generated-configure.sh的20061和21640行(common/autoconf/generated-configure.sh),解决 configure: error: GCC compiler is required 错误 修改前为: 1 as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5