Skip to main content
Last updated January 08, 2013 22:40, by neomatrix369
Feedicon  


JDK – all sub-projects


Building via CLI


To build JDK via the command-line interface (InfraBuild) perform the below actions respectively:

 cd ~/sources//jdk8_tl/common/makefiles
 make clean jdk NEWBUILD=true &> jdkInfrabuild.log


Configurating and building in Eclipse


Do the same actions as above for Hotspot (See How to build the Hotspot project in Eclipse) and translate names and locations that relate to the OpenJDK project. Import the project from /home/openjdk/sources/jdk8_tl/common/makefiles folder, rename the project to something like 'OpenJDK' instead of the 'makefiles' name given by default. Depending on the build system used, apply the below environment variable and argument list settings (does not require the traditional ALT_ ones anymore - instead they should all be unset).

 LANG=C
 PRODUCT_HOME=/home/openjdk/sources/jdk8_tl/build/linux-x64-normal-server-release/images/j2sdk-image
 ZIP_DEBUGINFO_FILES=0

When setting up the External Builder setting for the Infrabuild system, you can apply one of the below entries in the arguments list:

 images
 clean images
 images VERBOSE="-d -p"
 clean images VERBOSE="-d -p"

Note: Please refer to http://openjdk.java.net/projects/build-infra/guide.html for further details on what the arguments mean in the Infrabuild system.

The rest of the instructions to setup the Hotspot project apply. Build the project via the Project > Build Project option and wait for it to finish. The above results in creation of the j2re and j2sdk images in the /jdk8_tl/build/linux-x64-normal-server-release/images folder (in folders j2re-image and j2sdk-image respectively).

Note: you can jump start the process by using the ready-made projects made available in the Github repo mentioned below. A clean build using the InfraBuild system would take an hour on a VM and under 15 minutes on a native machine - all this subject to various performance factors of a system. The Old build system is slower in this respect.


Build dependencies


The JDK project is a composition a number of sub-projects which depend on other artefacts from the below projects:

    corba
    hotspot
    jaxp
    jaxws
    langtools

The build process involves building the sub-projects and the availability of artefacts from the above projects.


Build messages: logs

- A successful run of the build results in the output of the following log messages:

 jdkInfraBuild.log


Build output: artefacts

The general JDK build artefacts are a tree of files and directories as shown below and can be found at ~/sources/jdk8_tl/build/linux-x86_64-normal-server-release/jdk:

    bin
    break_iterator
    btbin
    btclasses
    classes
    gendata_timezone
    gendocsrc_rmic
    gensrc
    gensrc_headers
    gensrc_jdwp_doc
    gensrc_jdwp_headers
    gensrc_x11wrappers
    impsrc
    include
    lib
    objs
    _the.CORBA.binaries.imported



Next Step


Back to How to build the JDK sub-projects in Eclipse

or

See How to build the JDK sub-projects in Eclipse - Old Build

 
 
Close
loading
Please Confirm
Close