Jdk编译

https://openjdk.java.net/groups/build/doc/building.html

下载源码: git clone https://github.com/openjdk/jdk.git
  • Get the complete source code:
    git clone https://git.openjdk.java.net/jdk/
  • Run configure:
    bash configure
    • If configure fails due to missing dependencies (to either the toolchainbuild toolsexternal libraries or the boot JDK), most of the time it prints a suggestion on how to resolve the situation on your platform. Follow the instructions, and try running bash configure again.
  • Run make:
    make images
  • Verify your newly built JDK:
    ./build/*/images/jdk/bin/java -version
  • Run basic tests:
    make run-test-tier1
    • 需要配置jtreg。
    • 前往此处下载https://ci.adoptopenjdk.net/view/Dependencies/job/jtreg/lastSuccessfulBuild/artifact/
    • 解压
    • 重新配置 bash configure --with-jtreg=<path to jtreg home> 
    • 还需配置googletest
    • git clone -b release-1.8.1 https://github.com/google/googletest
    • 重新配置 bash configure --with-gtest=<path to googletest home>

Leave a Reply

Your email address will not be published. Required fields are marked *

lWoHvYe 无悔,专一