OpenJDK9源码编译

完全参考http://www.jianshu.com/p/26bd050610a4这篇文章

1. 本机环境

  • 系统版本:macOS Sierra (10.12)

  • Boot JDK:

    • java -version

      ⋊> ~/study java -version                                                                                                                                                                          21:41:25
      java version "1.8.0_45"
      Java(TM) SE Runtime Environment (build 1.8.0_45-b14)
      Java HotSpot(TM) 64-Bit Server VM (build 25.45-b02, mixed mode)
  • XCode:

  • xcodebuild -version

    ⋊> ~/study xcodebuild -version                                                                                                                                                                    22:00:15
    Xcode 8.0
    Build version 8A218a

    2. 安装必要软件

brew install ccache
brew install freetype

3. 下载源码

$ hg clone http://hg.openjdk.java.net/jdk9/jdk9 YourOpenJDK
$cd YourOpenJDK
$ bash ./get_source.sh

如果出现如下错误则重试

abort: stream ended unexpectedly (got 638305 bytes, expected 689947)

4. 编译

bash ./configure --with-freetype=/usr/local/opt/freetype --disable-zip-debug-info --disable-warnings-as-errors --with-debug-level=slowdebug 2>&1 | tee configure_mac_x64.log

猜你喜欢

转载自blog.csdn.net/xiaocszn/article/details/81709096