While looking to compile OpenJDK from source, the newest General Availability version (OpenJDK 10.0.1) insists on OpenJDK 9 or 10. JDK 11, however, is not due to be released until September 2018.
However, to my surprise, when I do apt search openjdk
the result is:
...
openjdk-11-jdk - OpenJDK Development Kit (JDK)
...
openjdk-8-jdk - OpenJDK Development Kit (JDK)
...
No OpenJDK 9 or 10!
And wait, is that OpenJDK 11? Maybe a Beta release? Nooo....
So I looked at apt show openjdk-11-jdk
:
Package: openjdk-11-jdk
Version: 10.0.1+10-3ubuntu1
...
Why has OpenJDK 10 been packaged as openjdk-11-*??
This is because those packages will become OpenJDK 11 when that is released. See this mailing list post:
That's also why the source package of
openjdk-11-*
is actually calledopenjdk-lts
.A bug report has been filed - please subscribe to it (but don't comment unless you have new information to add, which is unlikely). An Ubuntu dev, Jeremy Bicha, has responded:
A new bug report has been opened for tracking all changes that need to be made, and there are a lot of them - a rough count of 140. Excerpts from the bug report:
And another Ubuntu dev, Tiago Stürmer Daitx noted:
Still no ETA at present. Quite a few packages have been updated and added to the various PPAs maintained by the transition team, so if you wish to help out with testing, do check them out.
Update 17 April 2019:
It seems that fix has been released. Now
apt show openjdk-11-jdk
shows:And the output of
java -version
is:See muru's answer above,
but for a work around you can install openjdk 11 manually and add it to the update-alternatives so you can switch versions, and when the official package gets updated you can switch to that. see below to see how:
that unpacks the jdk under /usr/lib/jvm/jdk-11.0.2
then add it to the alternatives system
see it in the alternatives
check it works