Skip to content

Instantly share code, notes, and snippets.

View jorgedfbranco's full-sized avatar

Jorge Branco jorgedfbranco

  • Zurich, Switzerland
View GitHub Profile

Building the JDK and getting the HotSpot sources loaded into CLion

As I've already found myself more than once going through the steps of building the JDK on my Ubuntu machine and getting the Hotspot's source loaded into CLion, I ended up deciding to assemble this document to help me or others in the future, would the need eventually arise.

Building the JDK should be relatively painless, and when problems arise the tools are in generally very specific about what's wrong. In the worst of scenarios, a simple google search will most likely suffice. But as there are at least some things we should be wary about, I'm writing this simple tutorial down. In case you get stuck or if you need a more thorough guide, I highly recommend https://github.com/openjdk/jdk/blob/master/doc/building.md.

Getting the Hotspot code on CLion should also be straightforward, as long as you understand that due to macros / templates and the way code is separated (shared, os-specific, architecture-specific, etc), the experience will ne