命令行如何获取openjdk7u/openjdk8u源码

最近在研究java虚拟机,在自己实现编译openjdk的时候如何通过命令行获取jdk的源码呢,在linux环境或者在win下的cygwin中,如下操作。

  1. Install mercurial to /usr/bin.
  2. Go to directory you want to download jdk8 sources.
  3. Run there: hg clone http://hg.openjdk.java.net/jdk8u/jdk8u/
  4. cd jdk8u/
  5. chmod +x get_source.sh
  6. LANG=C
  7. ./get_source.sh
  8. Make some coffee.
  9. Read built-in README-builds.html (located in the jdk8u as stated in this example) in order to build sources from received data, depending on your system.
  10. Enjoy.
如果想获取jdk7u呢,只需要将链接设置为 http://hg.openjdk.java.net/jdk7u/jdk7u/

猜你喜欢

转载自blog.csdn.net/wqlinloveruby/article/details/80528082