JDK Build Process

The goal of Java Release Engineering is a reliable, reproducible and consistent build process. 

If you are not familiar with Mercurial repositories and forests, please see understanding mercurial.

The following is a representation of the build process for JDK7:

  • Remember: There is only one set of source for the OpenJDK and the regular JDK!

  • Integration areas: Each team has its own integration area: 2d, awt, hotspot, tl, jaxws, build, etc. An integration area is a forest which contains six repositories: corba, hotspot, jaxp, jaxws, jdk, langtools.  Together, these six repositories contain almost the entire JDK source. This allows a team to make all the changes necessary for its features regardless of where in the source they occur.

  • Each integration area is associated with a gate. A gate is a forest which is simply a copy of the integration area. A team pushes changes into the gate for their area, and the gate synchronizes with the area automatically. Each area has a gatekeeper who builds it to ensure the team's code does not break the overall JDK build.

  • Master: There is a master forest where the "official" source resides. You can see the list of JDK7 forests here - the master is jdk7/jdk7 and its child repositories are jdk7/jdk7/corba, jdk7/jdk7/hotspot, etc. The master's gate is jdk7/jdk7-gate and its child repositories are jdk7/jdk7-gate/corba, jdk7/jdk7-gate/hotspot, etc.

  • You can jump to a forest directly by appending its name to http://hg.openjdk.java.net/, e.g. the master jdk7/jdk7 is located at http://hg.openjdk.java.net/jdk7/jdk7.

  • The source of the master is also available for convenience in a ZIP file at this location.
  • The gatekeeper of an integration area is responsible for pushing the area's changes to the master's gate during the area's scheduled integration slot. The master's gate synchronizes with the master automatically, just as the integration areas synchronize with their gates automatically.

  • The following diagram shows the master and gate for the 'open' part of the JDK. The 'closed' master and gate are not shown - they contain a very minor portion of the JDK source which is still encumbered.

  • Release Engineering pulls build changes on a nightly or daily basis from the open and closed masters.  Nightly builds are run for eight different platforms as shown below in the blue boxes.

  • The promotion process happens weekly on a schedule. Promotion follows the same steps as the nightly build process except for the grayed out boxes above. It additionally distributes the built bits to QA teams in Sun to run acceptance testing. After QA has accepted the binaries, they are posted on the web for the JDK7 and OpenJDK7.

  • To summarize, the overall build process is shown below:

  •  Many thanks to Alex Buckley for his help with this blog entry!

Comments:

Hello,

Well this is a very good idea to post on this topic. What about going on step by step on the build process ?

I am trying since weeks to build openjdk on windows ... really, this is way too much complex ! I am trying to create a small patch for a cool feature, but I am wasting time in complex setup. Why not automate this as a simple maven project ? Something that will build automatically, picing the dependancies, etc. Somthing we can automate using continuous integration tools, etc.

Rgs,
JB
Another request, please make the C/C++ build non dependent on comercial development tools most people might not own. Loot at IceTea work for instance. Having a build working using GCC/MinGW (whatever the performance cost) would just ease newcommers to jump into the development. This would also ease cross building ...

If you expect the community to take some part of the burden, this is the way to go.

Posted by bjb on March 18, 2009 at 07:03 PM PDT #

Xiomara,

Thanks for an interesting blog. It's great to see this process explained in a concise way. What would be even better is to eventually get the IcedTea forest into this process somewhere :D

@JB: I'm sure Sun would welcome patches that make builds easier, especially on Windows where I believe hardly anyone builds OpenJDK. But a Maven build? We have enough problems bootstrapping OpenJDK as it is!!!

Posted by Andrew John Hughes on March 19, 2009 at 04:07 AM PDT #

Very nice to see JDK build process ! thanks.

Posted by Vaibhav Choudhary on March 23, 2009 at 03:15 PM PDT #

Post a Comment:
Comments are closed for this entry.
About

xiomara

Search

Top Tags
Categories
Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today