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
slides at slides.nipafx.dev
OpenJDK at
original repo: hg.openjdk.org/jdk/jdk
GitHub mirror: github.com/openjdk/jdk
It’s a bird!
It’s a plane!
It’s OpenJDK!
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
Contribute:
now you know how to clone, build, edit
check the bug database
contribute your own features
Not every contribution has to be code:
build your project against OpenJDK EA builds
experiment with incubating features and APIs
report experience/regressions to mailing lists
What is this? The place to collaborate on an open-source implementation of the Java Platform, Standard Edition, and related projects.
Also:
Major Linux distributions […] offer OpenJDK as their default Java SE implementation.
🤔
Categorization of links on openjdk.org:
Community | Project | Code |
---|---|---|
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:
Oracle on jdk.java.net
AdoptOpenJDK on adoptopenjdk.net
How is the OpenJDK code base developed?
That’s complicated, too!
RedHat’s Aleksey Shipilëv (@shipilev)
made a nice diagram.
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?
JDK update diagram: Aleksey Shipilëv