https://fedoraproject.org/wiki/Changes/Java11 .

== Summary ==
Update the system JDK in Fedora from java-1.8.0-openjdk to java-11-openjdk.

== Owner ==
* Name: [[User:jvanek| Jiri Vanek]]
* Email: <jva...@redhat.com>
* Product: java and java stack
* Responsible WG: java-sig (java and java-maint)

== Detailed Description ==
Fedora currently ships:
* java-1.8.0-openjdk (LTS)
* java-11-openjdk (LTS)
* an java-latest-openjdk (on jdk14, STS).
where the version-less '''java''' and '''javac''' (and friends) are
provided by java-1.8.0-openjdk.

So every package honoring the packaging rules and requiring java ,
java-headless or java-devel is built in brew by
java-1.8.0-openjdk-devel and pulls java-1.8.0-openjdk(-headless) in
runtime (See [https://fedoraproject.org/wiki/Java java] ).  Also
javapackaging-tools are using java-1.8.0-openjdk as hardcoded runtime
(see 
[https://fedoraproject.org/wiki/Changes/Decouple_system_java_setting_from_java_command_setting
changes])

Debian already moved to JDK11 as system JDK, and in Fedora community
we can hear for last two years increasing voices for jdk11 to become
the system one. And apparently the java stack is really quite ready
for JDK11. Fedora is considered to be bleeding edge distribution, so
we should move forward, however JDK11 is not 100% compatible with
JDK8, so there may rise nasty issues and very unhappy users.

Major incompatibility is in encapsulation. What was private, is now
really private and if one was using it (and it was common) then the
code will stop working. Unluckily, most of those issues are not only
build time issues, but runtime issues, so hard to spot without proper
test coverage.

=== A bit of history to recall: ===
version (upstream support) - fedora state
* Java SE 6 (LTS 2006-cca2014) - added as techpreview in F8 replaced
GCJ around F13. See https://fedoraproject.org/wiki/Releases
* Java SE 7 (LTS 2011-2020(?)) -  entered Fedora as tech preview
around F16/17 replaced JDK 6 as System JDK in F17
* Java SE 8 (LTS 2014-2026(???)) - entered Fedora as tech preview in
F19 replaced JDK 7 as System JDK in F21. JDK6 and JDK7 later returned
as community driven java-1-{6,7}-0-openjdk-legacy packages for a while
* Java SE 9 (2017-2018) - entered Fedora around F26 as secondary,
java-1.9.0-openjdk alongside java-1.8.0-openjdk
* Java SE 10 (2018-2019) - entered F28 as secondary,
java-latest-openjdk alongside java-1.8.0-openjdk
* Java SE 11 (LTS 2018-??) - entered Fedora as tech preview in F29
together with java-latest-openjdk and java-1.8.0-openjdk
* Java SE 12 (2019) -  updated java-latest-openjdk transparently and
keept going alongside java-1.8.0-openjdk and  alongside
java-11-openjdk
* Java SE 13 (2019-2020) - updated java-latest-openjdk transparently
and keept going alongside java-1.8.0-openjdk and  alongside
java-11-openjdk
* Java SE 14 (March 2020-2021(?)) - is updating  java-latest-openjdk
transparently and will continue to live next to any system JDK(s)
* Java SE 15 (2020(?)-2021(?))  - will update  java-latest-openjdk
transparently and will continue to live next to any system JDK(s)
* Java SE 16 () - will update  java-latest-openjdk transparently and
will continue to live next to any system JDK(s)
* Java SE 17 (LTS) - will very likely update  java-latest-openjdk
transparently  and will become future system JDK java-17-openjdk some
year later
* Java SE 18 () - will update  java-latest-openjdk transparently and
will continue to live next to any system JDK(s)
* ....

=== "Political disclaimer" ===
In previous bumps, we, Red Hat's openjdk team, were a driving force to
bump the system JDK. In this case, we are a bit reluctant, but the
desire from users to bump the JDK seems strong. We are quite happy to
skip JDK11 as system JDK at all, and jump directly from 8 to 17  in
some three years.

== Benefit to Fedora ==
JDK11 is out for some time, and most of the bleeding edge
distributions already make it default. Most of the projects already
adapted new features and make necessary forward-compatible chnages.
Although we can can expect some family of packages to remain on jdk8
for ever, [https://en.wikiquote.org/wiki/Dune_(film) the spice should
flow]

== Scope ==
=== keep java-1.8-0-openjdk but remove its java/javac versionless
provides, make java-11-openjdk providing java, javac and other
versionless provides ===
* will guarantee fedora to be pure JDK11 distro.
* will allow maintainers of JDK9 or up incompatible packages to keep
using JDK8, however this is just false hope.
** if such an package depends on package build by JDK11, JDK8 will not
be able to pick up that dependency.
** this may lead to quite a lot of bundling or compat. packages, but
may be acceptable
** people developing JDK8 applications will very likely stay with fedora:)

While quite a lot of users will rejoice, there may be cases where
application is very hard to migrate to JDK11, so the contingency plan
should be taken very serious.

=== Other possible approaches already discarded by various discussions  ===
(see wiki page)

=== Other ===
* Proposal owners:
** based on above, adapt jdk8 and jdk11 package provides
** If necessary tune the build environment

* Other developers:
** based on selected approach to tune the main build tools
*** at least jpackage-tools and maven will be very likely affected
** based on selected approach to tune the rpmbuild/macros
** many java package maintainers will maybe need to adapt theirs packages
*** After the approach is agreed, mass rebuild must be performed
*** FTBFS bugs connected with this proposal, maybe with jira ticket to
allow discussion.
*** Solutions to most common errors should be gathered and published
* Release engineering: [https://pagure.io/releng/issue/9347 9347]
** mass rebuild will be required for this change
* Policies and guidelines: how to deal with build failures, eventually
how to use some jdk11 specific build features will be provided
* Trademark approval: N/A (not needed for this Change)


== Upgrade/compatibility impact ==
Once the change is implemented properly, the update should be flawless
and seamless


== How To Test ==
* Depends on selected approach, only JRE11 should remain the only
system JDK after installing base javastack on clean system
* Both jdk8 and jdk11 can live togehter on system
* jdk11 will be selected by default and will run most of the base java stack
* todo, add few java-package to isntall examples, hopefully for jdk11 only


== User Experience ==
* Standard user should be still be able to use java stack without even
noticing the chnage.
* Standard developer should be still be able developer any java
application comfortably
* Standard packager will not suffer to much, and should be able to
pack any java application for fedora


== Dependencies ==
Around 2600 packages will need attendance
 $ repoquery -q --whatrequires java-headless |wc -l
 2481
 $ repoquery -q --whatrequires java | wc -l
 78
 $ repoquery -q --whatrequires java-devel | wc -l
 21
Packages needing major work will be
* java-1.8.0-openjdk
* java-11-openjdk
* icedtea-web


== Contingency Plan ==
* If the mass rebuild, after the change application, breaks to much
packages, or some important will be unfixable, jdk8 must be restored
back to the position of system jdk.
* Contingency mechanism: Return jdk8 as system jdk and mass rebuild
again. Note, that this may be very hard, because during build of
packages by jdk8, by jdk11 built dependencies will be picekd up, so
build will fail. Maybe several iterations of mass rebuild will be
needed.
* Contingency deadline: beta freeze
* Blocks release? Yes
* Blocks product? N/A
* Generally going back will be imho impossible. Once the decision is
taken, javastack should be fixed, and where it can not be fixed, it
had to migrate to compact packages, or bundled-dependencies pacages or
be orphaned.

== Documentation ==
* oracle11 release notes:
https://www.oracle.com/technetwork/java/javase/11-relnote-issues-5012449.html
* openjdk11 jeps: https://openjdk.java.net/projects/jdk/11/
* As we are moving from java8 to 11, and jdk9 is what brought in
breaking changes, providing also 9 and 10:
** openjd10 https://openjdk.java.net/projects/jdk/10/
** openjd9  https://openjdk.java.net/projects/jdk9/
** oracle10 
https://www.oracle.com/technetwork/java/javase/10-relnotes-4108314.html
** oracle9  
https://www.oracle.com/technetwork/java/javase/9-relnotes-3622618.html
*** where jdk9 migration
https://docs.oracle.com/javase/9/migrate/toc.htm#JSMIG-GUID-7744EF96-5899-4FB2-B34E-86D49B2E89B6
is quite useful for this proposal
* todo, gather most common issues packagers can face and provide solutions
** :
** :

-- 
Ben Cotton
He / Him / His
Senior Program Manager, Fedora & CentOS Stream
Red Hat
TZ=America/Indiana/Indianapolis
_______________________________________________
devel-announce mailing list -- devel-announce@lists.fedoraproject.org
To unsubscribe send an email to devel-announce-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/devel-announce@lists.fedoraproject.org

Reply via email to