Contributing to the

OpenJDK logo

Or how to engage in the OpenJDK project

Volker Simonis [Фолкер Симонис], SAP /

The OpenJDK Project

  • Open Source implementation of Java SE
  • Licensed under GPLv2 (with Classpath exception)
  • Reference implementation for Java 7, 8, 9, ..
  • Collaboration space for different implementers:
    • RedHat, SAP, IBM, Google, Intel, Twitter, Azul
  • Playground for Java SE related projects:
    • Coin, InvokeDynamic, Lambda, Nashorn, ...
    • Jigsaw, Graal, Panama, Value Types, ...

The Oracle Contribution Agreement (OCA)

  • Copyright and patent sharing agreement with regard to your contribution
    • Simple dual licensing model
  • Both, you and Oracle, can treat your contribution as if they were the sole owners
  • Oracle guarantees to always publish any contribution under a suitable
    Free Software Foundation (FSF) or Open Source Initiative (OSI) approved license.

OpenJDK and the Java™

  • You are not allowed to call it Java™ (or Java™ compatible) because:
    • "Java" is a registered trademark
    • You don't get access to the Technology Compatibility Kit (TCK)
  • Accessing the TCK requires the signing of the
    OpenJDK Community TCK License Agreement (OCTLA)
    • Only for OpenJDK or "substantially derived" projects
    • OCTLA forbids disclosing TCK information to non-OCTLA licensees
  • OCTLA is no trademark license!
  • "OpenJDK" can be used according to the "OpenJDK Trademark Notice"

OpenJDK Bylaws

  • The "constitution" of the OpenJDK project
  • Define OpenJDK Groups, Projects and Roles
  • Define the Governing Board which manages
    the structure and operation of the OpenJDK community
    • Chair (appointed by Oracle): Georges Saab
    • Vice-Chair (appointed by IBM): John Duimovich
    • OpenJDK Lead (appointed by Oracle): Mark Reinhold
    • At-Large Member (elected by OpenJDK Members): Doug Lea, SUNY Oswego
    • At-Large Member (elected by OpenJDK Members): Andrew Haley, RedHat

OpenJDK Organisation

  • Participants: individuals who subscribed to an OpenJDK mailing list
  • Contributors: Participants who signed the OCA
  • Groups (currently 20)
    • consist of Group Members and a Group Lead
      • Group Members elect new Group Members from Contributors
    • sponsor Projects
  • Projects (currently 54)
    • produce artifacts (code, documentation, whole JDK releases)
    • have code repositories, mailing lists and possibly web content
    • consist of Authors, Committers, Reviewers and a Project Lead
      • Project Leads appoint Authors from Contributors
      • Committers elect new Committers from Authors

OpenJDK Infrastructure

OpenJDK Tools - Mercurial

  • Mercurial is a distributed source control system implemented in Python.
  • OpenJDK uses nested sub-repositories so we must either:
    • clone them (corba, hotspot, jaxp, jaxws, jdk, langtools, nashorn) manually:
       hg clone jdk9-dev
      > cd jdk9-dev
      > hg clone
      > hg clone
    • or use the script which does the same in parallel:
       hg clone jdk9-dev
      > cd jdk9-dev
      > sh
    • Use common/bin/ to execute hg commands in all repositories

Building the OpenJDK

Building the OpenJDK

> mkdir output-jdk9-dev-dbg && cd output-jdk9-dev-dbg
> bash ...jdk9-dev/configure --disable-zip-debug-info --with-debug-level=slowdebug
> make images LOG=debug
Start 2015-09-24 20:24:53
End   2015-09-24 20:32:54
00:08:01 TOTAL
> ./images/jdk/bin/java -version
openjdk version "1.9.0-internal-debug"
OpenJDK Runtime Environment (build 1.9.0-internal-debug-simonis_2015_09_23-b00)
OpenJDK 64-Bit Server VM (build 1.9.0-internal-debug-simonis_2015_09_23-b00, mixed mode)

On error use “make images JOBS=1” and take a look at “build.log

OpenJDK Tools - JTreg

OpenJDK Tools - webrev

  • Webrev is a "poor man's" code review system (e.g. webrev for Bug 8081674)
  • A collection of diffs and patches in different formats
  • Ability to graphically display diffs in HTML-frames
  • May include additional HTML-formatted documentation
  • Ability to automatically link back to Java bugs at
  • Simple Korn shell script available from
     cd jdk
    > ksh webrev.ksh -o /tmp -O -c 8081674 -i 8081674.html
    > unzip -l /tmp/
         5643  2015-09-25 17:36   webrev/raw_files/old/src/.../jni_util.c
         8643  2015-09-25 17:36   webrev/index.html
    ---------                     -------
       320695                     75 files

Finding a Bug

  • Search for the bug in the bug database
    • Not all bugs are visible (security bugs, customer bugs, ..)
  • Try to reproduce the bug with the latest build (,
  • Try with a debug build (you'll have to build it!) - this may give you more insights
  • Try to write a simple reproducer (if possible a JTreg test)

Fixing a Bug

The Java Enhancement Process (JEP)