The plan for today:
get to know OpenJDK
clone the JDK codebase
set up a build and execute it
make a few simple API changes
build our hand-made JDK and use it
I don’t actually know what I’m talking about
this only covers my setup, ymmv
this is a proof of concept, not a tutorial
It’s a bird!
It’s a plane!
OpenJDK is many things:
we’ll discuss the details later
let’s dig into the code first
Code, code, code, code
it’s fun 😁
removes magic from your project
makes it easier to contribute
Not every contribution has to be code:
We’ve seen the OpenJDK code.
But what is OpenJDK?
Let’s check openjdk.java.net…
What is this? The place to collaborate on an open-source implementation of the Java Platform, Standard Edition, and related projects.
Major Linux distributions […] offer OpenJDK as their default Java SE implementation.
Categorization of links on openjdk.java.net:
It’s complicated - OpenJDK is many things:
of companies and individuals with a stake in Java
that discusses, plans, and implements changes to the OpenJDK code base
with Java’s reference implementation that’s the source of truth for most JDK distros out there
OpenJDK is no Java distribution!
It doesn’t ship binaries, but others do:
How is the OpenJDK code base developed?
That’s complicated, too!
There are many clones:
we’ve seen the canonical repo
every Java version has their clone
every project has their clone
every distribution has their clones
For ease of understanding,
let’s think of clones as branches.
A new feature, simplified:
developed in "feature branch"
merged into "master" when (nearly) finished
A release, simplified:
"release branch" created 3 months prior
only bug fixes merged to "release branch"
A bug/security/etc fix, simplified:
usually developed in "master"
merged into relevant release branches
Not that complicated after all.
But what you would expect…
from a large code base
housing an important project
gouverned by a diverse community
OpenJDK is a community / project / code base
the code base is large, but no magic
you can start working on it in an afternoon
why not give it a try and contribute?
Slides at slides.codefx.org
⇜ Get my book!
You can hire me:
training (Java 8-14, JUnit 5)
consulting (Java 8-14)