From Fedora Project Wiki

No edit summary
(Fix template transclusion with duplicate parameters)
 
Line 1: Line 1:
{{Infobox_group
{{Infobox_group
| name = java OpenJDK
| name               = Java OpenJDK
| image = [[File:test-days-banner.svg|300px|link=QA/Test Days]]
| image               = [[File:test-days-banner.svg|300px|link=QA/Test Days]]
| date = 2018-09-26
| date               = {{#dateformat:2018-09-26}}
| time = all day
| time               = All day
| website = [[QA/Test Days]]
| website             = [[QA/Test Days]]
| irc = [irc://irc.freenode.net/#fedora-test-day #fedora-test-day] ([http://webchat.freenode.net/?channels=fedora-test-day webirc])
| irc                 = [irc://irc.freenode.net/#fedora-test-day #fedora-test-day] ([http://webchat.freenode.net/?channels=fedora-test-day webirc])<br />[irc://irc.freenode.net/#fedora-devel #fedora-devel] ([http://webchat.freenode.net/?channels=fedora-devel webirc])
| irc = [irc://irc.freenode.net/#fedora-devel #fedora-devel] ([http://webchat.freenode.net/?channels=fedora-devel webirc])
| fedora_mailing_list = test
| fedora_mailing_list = test
}}
}}


{{admon/note | Can't make the date? | If you come to this page before or after the test day is completed, your testing is still valuable, and you can use the information on this page to test, file any bugs you find at [http://bugzilla.redhat.com Bugzilla], and add your results to the results section. If this page is more than a month old when you arrive here, please check the [[QA/Test_Days|current schedule]] and see if a similar but more recent Test Day is planned or has already happened.}}
{{Admon/note|Can't make the date?|If you come to this page before or after the test day is completed, your testing is still valuable, and you can use the information on this page to test, file any bugs you find at [https://bugzilla.redhat.com/ Bugzilla] and add your results to the results section. If this page is more than a month old when you arrive here, please check the [[QA/Test Days|current schedule]] and see if a similar but more recent Test Day is planned or has already happened.}}


== What to test? ==
== What to test ==
Today's instalment of Fedora Test Day will focus on [[Changes/java-11-openjdk-TechPreview|OpenJDK 11]] and [[Changes/java-openjdk-10|OpenJDK 10]]. Currently we have [https://src.fedoraproject.org/rpms/java-1.8.0-openjdk/ java-1.8.0-openjdk] as the main JDK in Fedora. It accompanied java-1.7.0-openjdk as JRE for a year, and replaced it in buildroot in '''F21'''. Similarly, as did java-1.7.0-openjdk to  java-1.6.0-openjdk in F16 as parallel JRE and replaced it in F17 in build root and main JDK.


Today's instalment of Fedora Test Day will focus on [[Changes/java-11-openjdk-TechPreview | OpenJDK 11]] and [[Changes/java-openjdk-10| OpenJDK 10]]. Currently we have  [https://src.fedoraproject.org/rpms/java-1.8.0-openjdk/  java-1.8.0-openjdk] as main JDK in Fedora. It accompanied  java-1.7.0-openjdk  as JRE for a year, and replaced it in buildroot in '''F21'''. Similarly, as did java-1.7.0-openjdk to  java-1.6.0-openjdk in F16 as parallel JRE and replaced it in F17 in build root and main JDK.
However, this time around, the situation is more complicated. Oracle changed release processes (see [[Changes/java-11-openjdk-TechPreview#Summary|OpenJDK 11 summary]] and [[Changes/java-openjdk-10#Summary|OpenJDK 10 summary]]) so currently, in F27 and up, you have '''java-1.8.0-openjdk''' as the main JDK, along with '''java-openjdk''', a rolling release of STS JDK 10, and '''java-11-openjdk''' as the technical preview of future LTS JDK. '''Javaws''' is provided in still yet another package—'''icedtea-web'''.
However, today the situation is more complicated. Oracle changed release process, see   [[Changes/java-11-openjdk-TechPreview#Summary | OpenJDK 11 summary]] and [[Changes/java-openjdk-10#Summary| OpenJDK 10 summary]], so currently, in F27 and up, you have '''java-1.8.0-openjdk''' as main JDK, '''java-openjdk''' as rolling release of STS JDK 10, and '''java-11-openjdk''' as techpreview of future LTS JDK. '''Javaws''' is provided in another package - '''icedtea-web'''
* Most crucial is, that JDK10 and JDK11, unlike JDK8, are modular, so  many Java applications will cease to work.
* Most crucial is, that JDK10 and JDK11, unlike JDK8, are modular, so  many java applications will cease to work.  
** This is not a crucial part of the testing, but to have an matrix of most common failures would be interesting.
** This is not crucial part of the testing, but to have an matrix of most common failures would be interesting
 
Among other changes are
Among other changes are:
* parallel installability
* parallel installability,
* switching of JRE/JDK
* switching of JRE/JDK,
* platform docs and sources
* platform docs and sources,
* config files in /etc
* config files in /etc, and
* system wide crypto policy
* system-wide crypto policy.


== Who's available ==
== Who's available ==
The following cast of characters will be available testing, workarounds, bug fixes, and general discussion. In case of problems related to test day organization/wiki/whatever, please reach out to [[User:Sumantrom|Sumantrom]].
* CET: [[User:Jvanek|jvanek]] <jvanek@redhat.com> + [[User:Jerboaa|jerboaa]], zzambers, mvala and pmikova
* EDT: stooke (stooke at redhat.com) + [[User:Omajid|omajid]] and jkang


The following cast of characters will be available testing, workarounds, bug fixes, and general discussion. In case of problem related to test day organization/wiki/whatever, please reach out to sumantrom.
== Prerequisites for Test Day ==  
* CET: jvanek (jvanek at  redhat.com) + zzambers, mvala, pmikova, jerboaa
* A kind relationship to Java
* EDT: stooke (stooke at redhat.com) + omajid, jkang
* Basic knowledge of Java and javac or rpms
 
* Basic knowledge of Java's jigsaw (major change in jdk9) is an advantage
== Prerequisite for Test Day ==  
 
* kind relationship to java
* basic knowledge of java and javac or rpms.
* basic knowledge of java's jigsaw (major change in jdk9) is advantage
* Root access on the system where testing is happening
* Root access on the system where testing is happening


=== Known issues ===
=== Known issues ===
* '''[[https://bugzilla.redhat.com/show_bug.cgi?id=1200302 dnf reinstall is broken]]'''
* '''[[rhbug:1200302|dnf reinstall is broken]]'''
* -debug or -slowdebug packages are not for reasonable use.  They are for people debugging JDK iself. This testcase is not covering them. Feel free to try to install them, and to switch them, also some apps should run in them (although terribly slowly) so if you face some issues with them, it is most likely not an issue.
* -debug or -slowdebug packages are not for reasonable use, they are for people debugging the JDK iself. This testcase is not covering them. Feel free to try to install them, and to switch them, also some apps should run in them (although terribly slowly) so if you face some issues with them, it is most likely not an issue.
* accessibility works only on java-1.8.0-openjdk
* Accessibility works only on java-1.8.0-openjdk
** even there it is known to have side effects and strange consequences
** Even there, it is known to have side effects and strange consequences
* recently was found broken icon at jdk8: https://bugzilla.redhat.com/show_bug.cgi?id=1626810
* Recently it was learned that there's a broken icon on jdk8: [[rhbug:1626810|missing icon in Xfce's applications menu; policytool only: "#ARCH#" in name and comment of desktop file]]


== How to test? ==
== How to test? ==
=== Applicationform ===
=== Application form ===
http://testdays.fedorainfracloud.org/events/48


http://testdays.fedorainfracloud.org/events/48
=== Basic cases ===
`sudo dnf install java`
# have it installed JRE you expected?
# is java on path and working?
# are java applications working?
# do you miss something?
# is content of /usr/lib/jvm sane?
# is content of /etc/java  sane? (jdk8 got /etc/java support in f29)
# are alternatives sane? (see lower)


=== Basic cases ===
`sudo dnf install java-devel`
<pre>
# have it installed JDK you expected?
sudo dnf install java
# is java and javac on path and working?
  # have it installed JRE you expected?
# do you miss something?
  # is java on path and working?
# is content of /usr/lib/jvm sane?
  # are java applications working?
# is content of /etc/java  sane? (jdk8 got /etc/java support in f29)
  # do you miss something?
# are alternatives sane? (see lower)
  # is content of /usr/lib/jvm sane?
  # is content of /etc/java  sane? (jdk8 got /etc/java support in f29)
  # are alternatives sane? (see lower)


sudo dnf install java-devel
`sudo dnf install java-openjdk`
  # have it installed JDK you expected?
# have it installed JRE you expected?
  # is java and javac on path and working?
# is java on path and working?
  # do you miss something?
# are java applications working?
  # is content of /usr/lib/jvm sane?
# do you miss something?
  # is content of /etc/java  sane? (jdk8 got /etc/java support in f29)
# similarly for java-openjdk-devel as with ava-devel
  # are alternatives sane? (see lower)
# is content of /usr/lib/jvm sane?
# is content of /etc/java  sane? (jdk8 got /etc/java support in f29)
# are alternatives sane? (see lower)


sudo dnf install java-openjdk
`sudo dnf install java-11-openjdk`
  # have it installed JRE you expected?
# have it installed JRE you expected?
  # is java on path and working?
# is java on path and working?
  # are java applications working?
# are java applications working?
  # do you miss something?
# do you miss something?
  # similarly for java-openjdk-devel as  jwith ava-devel
# similarly for java-11-openjdk-devel as  jwith ava-devel
  # is content of /usr/lib/jvm sane?
# is content of /usr/lib/jvm sane?
  # is content of /etc/java  sane? (jdk8 got /etc/java support in f29)
# is content of /etc/java  sane? (jdk8 got /etc/java support in f29)
  # are alternatives sane? (see lower)
# are alternatives sane? (see lower)


sudo dnf install java-11-openjdk
`sudo dnf install java-1.8.0-openjdk`
  # have it installed JRE you expected?
# have it installed JRE you expected?
  # is java on path and working?
# is java on path and working?
  # are java applications working?
# are java applications working?
  # do you miss something?
# do you miss something?
  # similarly for java-11-openjdk-devel as  jwith ava-devel
# similarly for java-1.8.0-openjdk-devel as  jwith ava-devel
  # is content of /usr/lib/jvm sane?
# is content of /usr/lib/jvm sane?
  # is content of /etc/java  sane? (jdk8 got /etc/java support in f29)
# is content of /etc/java  sane? (jdk8 got /etc/java support in f29)
  # are alternatives sane? (see lower)
# are alternatives sane? (see lower)


sudo dnf install java-1.8.0-openjdk
`sudo dnf install java-9-openjdk`
  # have it installed JRE you expected?
# should install nothing on f29
  # is java on path and working?
# if it does, it is a bug
  # are java applications working?
# should install on f28, but please donot
  # do you miss something?
  # similarly for java-1.8.0-openjdk-devel as  jwith ava-devel
  # is content of /usr/lib/jvm sane?
  # is content of /etc/java  sane? (jdk8 got /etc/java support in f29)
  # are alternatives sane? (see lower)


sudo dnf install java-9-openjdk
`sudo dnf install icedtea-web`
  # should install nothing on f29
# is javaws on path and working?
  # if it does, it is a bug
# are alternatives sane? (see lower)
  # should install on f28, but please donot


sudo dnf install icedtea-web
`sudo dnf update $JDK`
  # is javaws on path and working?
`sudo dnf remove $JDK`
  # are alternatives sane? (see lower)
# is the system sane after upgrade/remove?


sudo dnf update $JDK
sudo dnf remove $JDK
  # is the system sane after upgrade/remove?
</pre>
=== Switching JRE/JDK  ===
=== Switching JRE/JDK  ===
* Multiple jdks are handled by alternatives
* Multiple jdks are handled by alternatives
Line 122: Line 118:
* for icedtea-web: ''javaws''
* for icedtea-web: ''javaws''


<pre>
`sudo alternatives --config  $MASTER`
sudo alternatives --config  $MASTER
# will select the tooling acocrding by masters from above
  # will select the tooling acocrding by masters from above
# except programs on PATH, also direcotries in /usr/lib/jvm are shufled. Please observe!
  # except programs on PATH, also direcotries in /usr/lib/jvm are shufled. Please observe!
`alternatives --display $MASTER`
alternatives --display $MASTER
# will show current setup for given master
  # will show current setup for given master


### headless JRE ###
=== Headless JRE ===
  # if your application do not need X (GUI) operate with ...-headless subpackage  only in above examples
# if your application do not need X (GUI) operate with ...-headless subpackage  only in above examples
  # if you need javac,  operate with ...-devel subpackage  in above examples
# if you need javac,  operate with ...-devel subpackage  in above examples
  # if you need javadoc or sources,  operate with ...-src, -javadoc and javadoc-zip  subpackage  in above examples
# if you need javadoc or sources,  operate with ...-src, -javadoc and javadoc-zip  subpackage  in above examples


########################################################
{{Admon/note|Note|There are ''many'' jdk packages and countless subpackages.}}
# There are *manyjdk packages and countless subpackages
########################################################
no | sudo dnf install "java*openjdk*"
dnf  search  "java*openjdk*"
  # note for f28 -  jdk9 is no longer supported, and is there only because jdk10 was not alive in time of f28 release
  # on f29 you should NOT see jdk9 appear


  # Please try to install and use various combinations. This is quite crucial part of this testday.
`sudo dnf install "java*openjdk*"`
   # is the combination working and you can switch?
`dnf search "java*openjdk*"`
  # can you switch installtaions
# note for f28 -   jdk9 is no longer supported, and is there only because jdk10 was not alive in time of f28 release
  # are slaves as expected?
# on f29 you should NOT see jdk9 appear
  # is /etc/java affecting correct jdk and so on....


</pre>
# Please try to install and use various combinations. This is quite crucial part of this testday.
# is the combination working and you can switch?
# can you switch installtaions
# are slaves as expected?
# is /etc/java affecting correct jdk and so on....


=== System wide crypto policy  ===
=== System wide crypto policy  ===
Your java and javaws is affected by system crypto policy
Your java and javaws is affected by system crypto policy.
<pre>
update-crypto-policies --show
  # will should you current


sudo  update-crypto-policies --set DEFAULT
`update-crypto-policies --show`
  # will set standart policy
# will should you current
  # many javaws or https applications may cause to work


sudo  update-crypto-policies --set LEGACY
`sudo  update-crypto-policies --set DEFAULT`
  # will allow  insecure algorithms
# will set standart policy
  # is your failing javaws or https applications fixed?
# many javaws or https applications may cause to work


sudo  update-crypto-policies --set FUTURE
`sudo  update-crypto-policies --set LEGACY`
  # will harden your computer
# will allow  insecure algorithms
  # nearly no  javaws or https application will remain working
# is your failing javaws or https applications fixed?


</pre>
`sudo  update-crypto-policies --set FUTURE`
# will harden your computer
# nearly no  javaws or https application will remain working


=== Shenandoah  ===
=== Shenandoah  ===
<pre>
# jdk8 and jdk11 have new garabge collector (on x86_64 and aarch64)
  # jdk8 and jdk11 have new garabge collector (on x86_64 and aarch64)
# you can use it via: `java -XX:+UseShenandoahGC ohter_params_as_ususal`
  # you can use it via:
# or set it up globally: `export JAVA_TOOL_OPTIONS="-XX:+UseShenandoahGC $JAVA_TOOL_OPTIONS"`
java -XX:+UseShenandoahGC ohter_params_as_ususal
# are you applications working with Shenandoah?  
  # or set it up globally:
# are they working better?
export JAVA_TOOL_OPTIONS="-XX:+UseShenandoahGC $JAVA_TOOL_OPTIONS"
  # are you applications working with Shenandoah?  
  # are they working better?
 
</pre>


=== JAVA_HOME ===
=== JAVA_HOME ===
Line 186: Line 171:
* JAVA_HOME is partially deprecated, partially very common environment variable for java programmers and admins.
* JAVA_HOME is partially deprecated, partially very common environment variable for java programmers and admins.
* As fedora user, you should not be facing it.
* As fedora user, you should not be facing it.
* Fedora always uses *default* JRE/JDK (currenlty8) to build and run application. As fedora packager or developer, you may need it to change system JDK for both build and runtime.  
* Fedora always uses *default* JRE/JDK (currently v8) to build and run application. As fedora packager or developer, you may need it to change system JDK for both build and runtime.
<pre>
 
  # is JAVA_HOME working for you?
# is JAVA_HOME working for you?
</pre>
 
==== JAVA_HOME for common user ====
==== JAVA_HOME for common user ====
* Fedora always uses *default* JRE/JDK (currenlty8) to  run application.  
* Fedora always uses *default* JRE/JDK (currenlty8) to  run application.  
Line 195: Line 180:
* no metter what JRE you have selected via alternatives, default jdk is used
* no metter what JRE you have selected via alternatives, default jdk is used
* if you wish to run Fedora's packaged java applications,  with different JDK,  you must enforce it via JAVA_HOME
* if you wish to run Fedora's packaged java applications,  with different JDK,  you must enforce it via JAVA_HOME
<pre>
 
  # this is tricky to verify. Are you sure?
# this is tricky to verify. Are you sure?
  # is JAVA_HOME working for you?
# is JAVA_HOME working for you?
</pre>


=== Install Only JDK ===
=== Install Only JDK ===
* Our RPMs, can be installed fully in paralel:
* Our RPMs, can be installed fully in paralel:
* To enable this very special case, you have to modify '''/etc/dnf/dnf.conf''' and add/modify  '''installonlypkgs'''
* To enable this very special case, you have to modify '''/etc/dnf/dnf.conf''' and add/modify  '''installonlypkgs'''
<pre>
`installonlypkgs=list_of_packages_you_care_about`
installonlypkgs=list_of_packages_you_care_about
 
</pre>
The list differs if you care about headless jre only, or full JDK. eg.:
The list differs if you care about headless jre only, or full JDK. eg.:
<pre>
 
installonlypkgs=java-1.8.0-openjdk-headless java-1.8.0-openjdk java-1.8.0-openjdk-devel
`installonlypkgs=java-1.8.0-openjdk-headless java-1.8.0-openjdk java-1.8.0-openjdk-devel`
</pre>
 
Most commonly:  
Most commonly:  
<pre>
 
installonlypkgs=java-1.8.0-openjdk*
`installonlypkgs=java-1.8.0-openjdk*`
</pre>
 
Or:  
Or:  
<pre>
 
installonlypkgs=java-11-openjdk*
`installonlypkgs=java-11-openjdk*`
</pre>
 
This case, however hard to maintain is really used by people developing java itself. Also it is very useful for admins, who can try to deploy application on newer version by parts, or try first.
This case, however hard to maintain is really used by people developing Java itself. Also it is very useful for admins, who can try to deploy application on newer version by parts, or try first.
<pre>
 
  # is the multiple install feature working for you as advertised?
# is the multiple install feature working for you as advertised?
</pre>


== Exploratory testing ==
== Exploratory testing ==
 
If you run out of test cases, congratulations! But that's not the end! You can still help out by playing around with the various installs uninstalls parallel installs jre/jdk switching... in whatever ways you can think of: try out all the things you can find.  Get creative! Any problems you find please file a bug, or report to the IRC channel.
If you run out of test cases, congratulations! But that's not the end! You can still help out by playing around with the various installs uninstalls parallel isntalls jre/jdk switching...   in whatever ways you can think of: try out all the things you can find.  Get creative! Any problems you find please file a bug, or report to the IRC channel.


== Reporting bugs ==
== Reporting bugs ==
 
If you have problems with any of the tests, report a bug to [https://bugzilla.redhat.com/ Bugzilla] usually for the component [[rhbug:Fedora&version=28&component=java-openjdk|java-openjdk]] or [[rhbug:Fedora&version=28&component=java-11-openjdk|java-11-openjdk]] or [[rhbug:Fedora&version=28&component=java-1.8.0-openjdk|java-1.8.0-openjdk]]. If you are unsure about exactly how to file the report or what other information to include, just ask on IRC and we will help you.
If you have problems with any of the tests, report a bug to [https://bugzilla.redhat.com Bugzilla] usually for the component [https://bugzilla.redhat.com/enter_bug.cgi?product=Fedora&version=28&component=java-openjdk java-openjdk] or [https://bugzilla.redhat.com/enter_bug.cgi?product=Fedora&version=28&component=java-11-openjdk java-11-openjdk] or [https://bugzilla.redhat.com/enter_bug.cgi?product=Fedora&version=28&component=java-1.8.0-openjdk java-1.8.0-openjdk]. If you are unsure about exactly how to file the report or what other information to include, just ask on IRC and we will help you.


== Test Results ==
== Test Results ==
=== Install ===
=== Install ===
{|
{|
! User
! User !! Profile
! Profile
! [[User:Sumantrom/Draft/Testcase_java_install java install|java]]
! [http://fedoraproject.org/wiki/User:Sumantrom/Draft/Testcase_java_install java install]
! [[User:Sumantrom/Draft/Testcase_java-devel_install java-devel install|java-devel]]
! [http://fedoraproject.org/wiki/User:Sumantrom/Draft/Testcase_java-devel_install java-devel install]
! [[User:Sumantrom/Draft/Testcase_java-openjdk_install java-openjdk install|openjdk]]
! [http://fedoraproject.org/wiki/User:Sumantrom/Draft/Testcase_java-openjdk_install java-openjdk install]
! [[User:Sumantrom/Draft/Testcase_java-11-openjdk_install java-11-openjdk install|java-11-openjdk]]
! [http://fedoraproject.org/wiki/User:Sumantrom/Draft/Testcase_java-11-openjdk_install java-11-openjdk install]
! [[User:Sumantrom/Draft/Testcase_java-1.8.0-openjdk_install java-1.8.0-openjdk install|java-1.8.0-openjdk]]
! [http://fedoraproject.org/wiki/User:Sumantrom/Draft/Testcase_java-1.8.0-openjdk_install java-1.8.0-openjdk install]
! [[User:Sumantrom/Draft/Testcase_java-9-openjdk_install java-9-openjdk install|java-9-openjdk]]
! [http://fedoraproject.org/wiki/User:Sumantrom/Draft/Testcase_java-9-openjdk_install java-9-openjdk install]
! [[User:Sumantrom/Draft/Testcase_icedtea-web_install icedtea-web install|icedtea]]
! [http://fedoraproject.org/wiki/User:Sumantrom/Draft/Testcase_icedtea-web_install icedtea-web install]
! References
! References
|-
|-
| [[User:Andrlos|andrlos]] || f29-x64 || {{Result|pass}} || {{Result|pass}} || {{Result|pass}} || {{Result|pass}} || {{Result|pass}}<ref>{{Archive:Template:Bz|1633332}} java 1.8.0 configs missing in /etc/java</ref>{{Result|pass}}
| [[User:andrlos|andrlos]]
| {{Result|pass}}
| f29-x64
| {{Result|pass}}
| {{result|pass}}
| <references />
| {{result|pass}}
|-
| {{result|pass}}
| [[User:Nabooengineer|nabooengineer]] || Fedora-Workstation-Live-x86_64-29_Beta-1.5 + Updates || {{Result|pass}}
| {{result|pass}}
| {{Result|warn}}<ref>I rolled back the initial VM snapshot each time to do a fresh install vs. installing each additive. Then installed all of them to test the alternatives switching.</ref>{{Result|pass}}
| {{result|pass}}<ref>{{bz|1633332}} java 1.8.0 configs missing in /etc/java</ref>{{result|pass}}
| {{Result|pass}}
| {{result|pass}}
| {{Result|pass}}
| {{result|pass}}
| {{Result|pass}}
| <references/>
| {{Result|fail}}<ref>sudo dnf install java-9-openjdk
|-
| [[User:nabooengineer|nabooengineer]]
| Fedora-Workstation-Live-x86_64-29_Beta-1.5 + Updates
| {{result|pass}}
| {{result|warn}}<ref>I rolled back the initial VM snapshot each time to do a fresh install vs. installing each additive. Then installed all of them to test the alternatives switching.</ref>{{result|pass}}
| {{result|pass}}
| {{result|pass}}
| {{result|pass}}
| {{result|fail}}<ref>sudo dnf install java-9-openjdk
Last metadata expiration check: 0:04:00 ago on Tue 25 Sep 2018 11:43:45 PM EDT.
Last metadata expiration check: 0:04:00 ago on Tue 25 Sep 2018 11:43:45 PM EDT.
No match for argument: java-9-openjdk
No match for argument: java-9-openjdk
Error: Unable to find a match
Error: Unable to find a match
</ref>
</ref>
| {{result|pass}}
| {{Result|pass}}
| <references/>
| <references />
|-
|-
| [[User:spathare|spathare]]
| [[User:spathare|spathare]] || Fedora 29 Workstation x86_64 || {{Result|pass}} || {{Result|pass}} || {{Result|pass}}
| Fedora 29 Workstation x86_64
|{{Result|pass}} || {{Result|pass}} || {{Result|pass}} || {{Result|pass}} || <references />
| {{result|pass}}
|-
| {{result|pass}}
| [[User:stooke|stooke]]
| {{result|pass}}
|  
| {{result|pass}}
| {{Result|pass}}<ref>I found the different separators between the package names and java versions slightly confusing, and for a second thought it was downgrading.  This was totally my carelessness, but I thought I'd admit to it.
| {{result|pass}}
| {{result|pass}}
| {{result|pass}}
| <references/>
|-
| [[User:stooke|stooke]]
|  
| {{result|pass}}<ref>I found the different separators between the package names and java versions slightly confusing, and for a second thought it was downgrading.  This was totally my carelessness, but I thought I'd admit to it.


$ java --version
$ java --version

Latest revision as of 23:42, 19 July 2024

Java OpenJDK

Date 2018-09-26
Time All day

Website QA/Test Days
IRC #fedora-test-day (webirc)
#fedora-devel (webirc)
Mailing list test


Can't make the date?
If you come to this page before or after the test day is completed, your testing is still valuable, and you can use the information on this page to test, file any bugs you find at Bugzilla and add your results to the results section. If this page is more than a month old when you arrive here, please check the current schedule and see if a similar but more recent Test Day is planned or has already happened.

What to test[edit]

Today's instalment of Fedora Test Day will focus on OpenJDK 11 and OpenJDK 10. Currently we have java-1.8.0-openjdk as the main JDK in Fedora. It accompanied java-1.7.0-openjdk as JRE for a year, and replaced it in buildroot in F21. Similarly, as did java-1.7.0-openjdk to java-1.6.0-openjdk in F16 as parallel JRE and replaced it in F17 in build root and main JDK.

However, this time around, the situation is more complicated. Oracle changed release processes (see OpenJDK 11 summary and OpenJDK 10 summary) so currently, in F27 and up, you have java-1.8.0-openjdk as the main JDK, along with java-openjdk, a rolling release of STS JDK 10, and java-11-openjdk as the technical preview of future LTS JDK. Javaws is provided in still yet another package—icedtea-web.

  • Most crucial is, that JDK10 and JDK11, unlike JDK8, are modular, so many Java applications will cease to work.
    • This is not a crucial part of the testing, but to have an matrix of most common failures would be interesting.

Among other changes are:

  • parallel installability,
  • switching of JRE/JDK,
  • platform docs and sources,
  • config files in /etc, and
  • system-wide crypto policy.

Who's available[edit]

The following cast of characters will be available testing, workarounds, bug fixes, and general discussion. In case of problems related to test day organization/wiki/whatever, please reach out to Sumantrom.

  • CET: jvanek <jvanek@redhat.com> + jerboaa, zzambers, mvala and pmikova
  • EDT: stooke (stooke at redhat.com) + omajid and jkang

Prerequisites for Test Day[edit]

  • A kind relationship to Java
  • Basic knowledge of Java and javac or rpms
  • Basic knowledge of Java's jigsaw (major change in jdk9) is an advantage
  • Root access on the system where testing is happening

Known issues[edit]

How to test?[edit]

Application form[edit]

http://testdays.fedorainfracloud.org/events/48

Basic cases[edit]

sudo dnf install java

  1. have it installed JRE you expected?
  2. is java on path and working?
  3. are java applications working?
  4. do you miss something?
  5. is content of /usr/lib/jvm sane?
  6. is content of /etc/java sane? (jdk8 got /etc/java support in f29)
  7. are alternatives sane? (see lower)

sudo dnf install java-devel

  1. have it installed JDK you expected?
  2. is java and javac on path and working?
  3. do you miss something?
  4. is content of /usr/lib/jvm sane?
  5. is content of /etc/java sane? (jdk8 got /etc/java support in f29)
  6. are alternatives sane? (see lower)

sudo dnf install java-openjdk

  1. have it installed JRE you expected?
  2. is java on path and working?
  3. are java applications working?
  4. do you miss something?
  5. similarly for java-openjdk-devel as with ava-devel
  6. is content of /usr/lib/jvm sane?
  7. is content of /etc/java sane? (jdk8 got /etc/java support in f29)
  8. are alternatives sane? (see lower)

sudo dnf install java-11-openjdk

  1. have it installed JRE you expected?
  2. is java on path and working?
  3. are java applications working?
  4. do you miss something?
  5. similarly for java-11-openjdk-devel as jwith ava-devel
  6. is content of /usr/lib/jvm sane?
  7. is content of /etc/java sane? (jdk8 got /etc/java support in f29)
  8. are alternatives sane? (see lower)

sudo dnf install java-1.8.0-openjdk

  1. have it installed JRE you expected?
  2. is java on path and working?
  3. are java applications working?
  4. do you miss something?
  5. similarly for java-1.8.0-openjdk-devel as jwith ava-devel
  6. is content of /usr/lib/jvm sane?
  7. is content of /etc/java sane? (jdk8 got /etc/java support in f29)
  8. are alternatives sane? (see lower)

sudo dnf install java-9-openjdk

  1. should install nothing on f29
  2. if it does, it is a bug
  3. should install on f28, but please donot

sudo dnf install icedtea-web

  1. is javaws on path and working?
  2. are alternatives sane? (see lower)

sudo dnf update $JDK sudo dnf remove $JDK

  1. is the system sane after upgrade/remove?

Switching JRE/JDK[edit]

  • Multiple jdks are handled by alternatives
  • Major masters are:
  • for SDK: javac, java_sdk_openjdk, java_sdk_$VERSION, java_sdk_$VERSION_openjdk
  • for JRE: java, jre_openjdk, jre_$VERSION, jre_$VERSION_openjdk
    • where version is one of 1.8.0, 10, 11
  • for javadoc: javadocdir
  • or javadoc-zip: javadoczip
  • for icedtea-web: javaws

sudo alternatives --config $MASTER

  1. will select the tooling acocrding by masters from above
  2. except programs on PATH, also direcotries in /usr/lib/jvm are shufled. Please observe!

alternatives --display $MASTER

  1. will show current setup for given master

Headless JRE[edit]

  1. if your application do not need X (GUI) operate with ...-headless subpackage only in above examples
  2. if you need javac, operate with ...-devel subpackage in above examples
  3. if you need javadoc or sources, operate with ...-src, -javadoc and javadoc-zip subpackage in above examples
Note
There are many jdk packages and countless subpackages.

sudo dnf install "java*openjdk*" dnf search "java*openjdk*"

  1. note for f28 - jdk9 is no longer supported, and is there only because jdk10 was not alive in time of f28 release
  2. on f29 you should NOT see jdk9 appear
  1. Please try to install and use various combinations. This is quite crucial part of this testday.
  2. is the combination working and you can switch?
  3. can you switch installtaions
  4. are slaves as expected?
  5. is /etc/java affecting correct jdk and so on....

System wide crypto policy[edit]

Your java and javaws is affected by system crypto policy.

update-crypto-policies --show

  1. will should you current

sudo update-crypto-policies --set DEFAULT

  1. will set standart policy
  2. many javaws or https applications may cause to work

sudo update-crypto-policies --set LEGACY

  1. will allow insecure algorithms
  2. is your failing javaws or https applications fixed?

sudo update-crypto-policies --set FUTURE

  1. will harden your computer
  2. nearly no javaws or https application will remain working

Shenandoah[edit]

  1. jdk8 and jdk11 have new garabge collector (on x86_64 and aarch64)
  2. you can use it via: java -XX:+UseShenandoahGC ohter_params_as_ususal
  3. or set it up globally: export JAVA_TOOL_OPTIONS="-XX:+UseShenandoahGC $JAVA_TOOL_OPTIONS"
  4. are you applications working with Shenandoah?
  5. are they working better?

JAVA_HOME[edit]

  1. is JAVA_HOME working for you?

JAVA_HOME for common user[edit]

  • Fedora always uses *default* JRE/JDK (currenlty8) to run application.
  • all java applications are also build by this JDK.
  • no metter what JRE you have selected via alternatives, default jdk is used
  • if you wish to run Fedora's packaged java applications, with different JDK, you must enforce it via JAVA_HOME
  1. this is tricky to verify. Are you sure?
  2. is JAVA_HOME working for you?

Install Only JDK[edit]

  • Our RPMs, can be installed fully in paralel:
  • To enable this very special case, you have to modify /etc/dnf/dnf.conf and add/modify installonlypkgs

installonlypkgs=list_of_packages_you_care_about

The list differs if you care about headless jre only, or full JDK. eg.:

installonlypkgs=java-1.8.0-openjdk-headless java-1.8.0-openjdk java-1.8.0-openjdk-devel

Most commonly:

installonlypkgs=java-1.8.0-openjdk*

Or:

installonlypkgs=java-11-openjdk*

This case, however hard to maintain is really used by people developing Java itself. Also it is very useful for admins, who can try to deploy application on newer version by parts, or try first.

  1. is the multiple install feature working for you as advertised?

Exploratory testing[edit]

If you run out of test cases, congratulations! But that's not the end! You can still help out by playing around with the various installs uninstalls parallel installs jre/jdk switching... in whatever ways you can think of: try out all the things you can find. Get creative! Any problems you find please file a bug, or report to the IRC channel.

Reporting bugs[edit]

If you have problems with any of the tests, report a bug to Bugzilla usually for the component java-openjdk or java-11-openjdk or java-1.8.0-openjdk. If you are unsure about exactly how to file the report or what other information to include, just ask on IRC and we will help you.

Test Results[edit]

Install[edit]

User Profile java java-devel openjdk java-11-openjdk java-1.8.0-openjdk java-9-openjdk icedtea References
andrlos f29-x64
Pass pass
Pass pass
Pass pass
Pass pass
Pass pass
[1]
Pass pass
Pass pass
Pass pass
  1. RHBZ #1633332 java 1.8.0 configs missing in /etc/java
nabooengineer Fedora-Workstation-Live-x86_64-29_Beta-1.5 + Updates
Pass pass
Warning warn
[1]
Pass pass
Pass pass
Pass pass
Pass pass
Fail fail
[2]
Pass pass
  1. I rolled back the initial VM snapshot each time to do a fresh install vs. installing each additive. Then installed all of them to test the alternatives switching.
  2. sudo dnf install java-9-openjdk Last metadata expiration check: 0:04:00 ago on Tue 25 Sep 2018 11:43:45 PM EDT. No match for argument: java-9-openjdk Error: Unable to find a match
spathare Fedora 29 Workstation x86_64
Pass pass
Pass pass
Pass pass
Pass pass
Pass pass
Pass pass
Pass pass
stooke
Pass pass
[1]
Pass pass
[2]
Fail fail
[3]
Pass pass
Warning warn
[4]
  1. I found the different separators between the package names and java versions slightly confusing, and for a second thought it was downgrading. This was totally my carelessness, but I thought I'd admit to it. $ java --version openjdk 11-ea 2018-09-25 OpenJDK Runtime Environment (build 11-ea+22) OpenJDK 64-Bit Server VM (build 11-ea+22, mixed mode, sharing) RPM install: Installing: java-11-openjdk x86_64 1:11.0.ea.28-2.fc29 updates-testing 193 k All I saw was the "+22" and "-2" until I looked carefully.
  2. Sorry, I just read the test case again, and this was expected behaviour. As a user, I would find it very confusing - if I dnf install java , then I would expect the java-devel package to be the same version.
  3. sudo dnf install java-devel offered to (and I let it) install (1/3): java-1.8.0-openjdk-1.8.0.181.b15-0.fc29.x86_64.rpm 103 kB/s | 234 kB 00:02 (2/3): java-1.8.0-openjdk-devel-1.8.0.181.b15-0.fc29.x86_64.rpm 651 kB/s | 9.8 MB 00:15 (3/3): java-1.8.0-openjdk-headless-1.8.0.181.b15-0.fc29.x86_64.rpm 875 kB/s | 32 MB 00:37 I would expect JDK 11 !
  4. JDK 11 was installed by default on my version of f29, so I got "already installed"
stooke Fedora-Workstation-Live-x86_64-29_Beta-1.5 + Updates
Pass pass
[1]
Pass pass
[2]
Pass pass
  1. (already installed)
  2. "Error: Unable to find a match"

Multiple installs[edit]

User Profile multiple java-11-devel installs multiple java-devel installs multiple java-1.8.0-devel multiple java-11-devel and java-10-devel installs multiple java-11-devel and java-1.8.0-devel installs multiple java-10-devel and java-10-devel installs multiple java-11-devel and java-10-devel and java-1.8.0-devel installs References

switch JRE/JDK[edit]

User Profile swtich JRE/JDK References
nabooengineer Fedora-Workstation-Live-x86_64-29_Beta-1.5 + Updates
Pass pass
[1]
  1. Awesome, just be aware that some familiarity with alternatives & java helps to do this test. The "How to test" instructions are a little nebulous, as such not as clean as the install "How to test".
spathare Fedora 29 Workstation x86_64
Pass pass
stooke Fedora-Workstation-Live-x86_64-29_Beta-1.5 + Updates
Pass pass
[1]
  1. I think it might be confusing if java gets you 1.8, while javac gets you 11 - the mismatch should be flagged with a warning, at 'alternatives' time somehow

crypto config[edit]

User Profile system wide References
nabooengineer Fedora-Workstation-Live-x86_64-29_Beta-1.5 + Updates
Pass pass
[1]
  1. DEFAULT, LEGACY & FUTURE worked as expected.
spathare Fedora 29 Workstation x86_64
Pass pass
stooke Fedora-Workstation-Live-x86_64-29_Beta-1.5 + Updates
Pass pass

Shenandoah[edit]

User Profile GC testing References
nabooengineer Fedora-Workstation-Live-x86_64-29_Beta-1.5 + Updates
Pass pass
[1]
Warning warn
[2]
  1. Decreasing the VCPU count from 4 to 1 allows me to see the better performance of ShenandoahGC over default GC
  2. Shenandoah GC appears to be functionally working as expected. GC does seem smoother/quicker. However I don't really see a pause time impact, really need to do a performance comparison benchmark and on bare metal vs on a VM F29 install. Will require some time to setup a real test, unless we have a specific test case comparison. Do we have a specific comparison?

rpm/dnf ops[edit]

User Profile java java-devel java-openjdk java-11-openjdk java-1.8.0-openjdk icedtea-web References
nabooengineer Fedora-Workstation-Live-x86_64-29_Beta-1.5 + Updates
Pass pass
Pass pass
Pass pass
Pass pass
Pass pass
Pass pass
stooke Fedora-Workstation-Live-x86_64-29_Beta-1.5 + Updates
Fail fail
[1]
Pass pass
Pass pass
Pass pass
Pass pass
Pass pass
  1. "sudo dnf remove java" offered to remove all versions of java on my system, yet "sudo dnf remove java-devel" only offered to remove JDK 1.8.0. This is inconsistent.