RFR: Added build section

David Holmes dholmes at openjdk.java.net
Thu Apr 29 22:25:59 UTC 2021


On Wed, 28 Apr 2021 00:24:44 GMT, Jesper Wilhelmsson <jwilhelm at openjdk.org> wrote:

> Instructions on how to build the JDK.

Seems okay though I'm not sure how much can/should go in this guide. I don't see any link to the actual build docs though.

Thanks,
David

src/index.md line 995:

> 993: The JDK build system is a fairly complex machine that has the ability to build anything from a single module to a complete shippable JDK bundle with various levels of debug capabilities, run tests, install your newly built JDK on your system, or cross-compile for some other system. The build uses `make` and a few other tools that you will have to install on your system before starting.
> 994: 
> 995: The JDK supports incremental builds. This means that if you have a complete build and make changes in just a single part of the JDK (e.g. a module or part of the JVM), only that particular part needs to be rebuilt. So subsequent builds will be faster and you can always use a make target that results in a complete JDK image without having to worry about actually building the entire JDK every time. Please note that the incremental build do have limmits in its understanding of what you change. For instance, if you change behaviors or conventions in one module there may be other parts of the JDK that implicitly depends on these without make's knowledge. For this reason you may have to rebuild several modules, or do a clean build if you change things that may have a wider impact.

typo: limmits

src/index.md line 997:

> 995: The JDK supports incremental builds. This means that if you have a complete build and make changes in just a single part of the JDK (e.g. a module or part of the JVM), only that particular part needs to be rebuilt. So subsequent builds will be faster and you can always use a make target that results in a complete JDK image without having to worry about actually building the entire JDK every time. Please note that the incremental build do have limmits in its understanding of what you change. For instance, if you change behaviors or conventions in one module there may be other parts of the JDK that implicitly depends on these without make's knowledge. For this reason you may have to rebuild several modules, or do a clean build if you change things that may have a wider impact.
> 996: 
> 997: The log below shows the steps taken to download and build the JDK source code from the mainline JDK development GIT repository. The configure script will tell you what additional packages you need. In this particular case several packages was needed since this build was performed on a clean Ubuntu installation. The configure script was run several times to get all the dependencies, but only the commands actually needed to get the JDK built is included in the log.

s/was needed/were needed/
s/is included/are included/

src/index.md line 1049:

> 1047: | `docs` | Builds the javadoc. Note that a number of classes in the javadoc API are generated during the build, so `make docs` might do more than simply invoke `javadoc`, depending on the state of your build. |
> 1048: | `java.base` | Builds the base module. You can (re)build any module with `make <module>`. |
> 1049: | `hotspot` | Builds only the JVM. |

And any dependencies, which includes quite a bit actually.

-------------

Marked as reviewed by dholmes (Author).

PR: https://git.openjdk.java.net/guide/pull/56


More information about the guide-dev mailing list