Open source, reference implementation. Resulted from a partial open sourcing of Oracle's Java implementation.
Sample output of java -version
on Ubuntu 14.04:
java version "1.7.0_65"
OpenJDK Runtime Environment (IcedTea 2.5.3) (7u71-2.5.3-0ubuntu0.14.04.1)
OpenJDK 64-Bit Server VM (build 24.65-b04, mixed mode)
Source browser and mercurial URLs: http://hg.openjdk.java.net/. Mercurial.
TODO how is it versioned?
It seems to use:
jdk8u60-b12
to mean:
8
: major60
: minor,u
for Update12
: patch,b
for Build
TODO: jdk8u60-b26
vs jdk8-b27
? AKA http://hg.openjdk.java.net/jdk8u vs http://hg.openjdk.java.net/jdk8
- https://github.com/hgomez/obuildfactory
- https://gfiber.googlesource.com/buildroot/+/master/package/openjdk-bin/openjdk-bin.mk
- https://github.com/florian-gauvin/Buildroot-Openjdk/blob/f9962b187c71678dae0fcd7913876127b0b85a7d/package/openjdk/openjdk.mk
- https://en.wikipedia.org/wiki/JamVM
Get sources:
hg clone http://hg.openjdk.java.net/jdk8/jdk8
cd jdk8
sh get_source.sh
The get_source.sh
is needed since the source is split across many HG repositories.
The entire JDK 8 takes up 900M.
Ubuntu 14.04 build dependencies (my printer stopped working afterwards...):
sudo aptitude install libcups2-dev libfreetype6-dev libasound2-dev ccache
Build everything with:
bash configure
make -j $(nproc)
Took 25 minutes on a mid range computer from 2012.
make help
teaches you more, e.g. how to build only certain parts of the JDK:
make -j $(nproc) hotspot
make -j $(nproc) jdk
Finally:
cd build/linux-x86_64-normal-server-release/jdk/bin
./java -version
Sample output:
openjdk version "1.8.0-internal"
OpenJDK Runtime Environment (build 1.8.0-internal-ciro_2015_03_10_22_39-b00)
OpenJDK 64-Bit Server VM (build 25.0-b70, mixed mode)
Some interesting files and directories:
-
jdk/src/share/classes/java
: JCL -
hotspot
: the VM, including many native methods. There are also some native methods underjdk/src
.-
hotspot/src/share/vm
: platform agnostic VM code, mainly C++. -
hotspot/src/share/os
: OS specific code, containsbsd
,linux
,posix
(used for all others but Windows),solaris
,windows
Contains the definition of several native methods.
-
hotspot/src/share/cpu
: OS specific code-
hotspot/src/share/cpu/zero
: CPU agnostic interpreter-only implementation when speed is not important.Started by IcedTea.
-
-
-
langtools/src/share/classes/com/sun/tools/javadoc/Main.java
: Javadoc -
langtools/src/share/classes/com/sun/tools/javac/Main.java
: Javac
The Java process is very closed, probably because of Oracle?
I can't even manage to post an issue, so I wonder if it is even possible to have patches merged.
Create a new issue or feature request: http://bugreport.java.com/submit_intro.do Bugs only appear after review. Bulls***.
TODO how to browse the bugs? More bull****?
TODO vs https://bugs.openjdk.java.net? On that site you need a login, and to get it you need Author status...