Java OpenJDK | |
---|---|
Date | 2018-09-26 |
Time | All day |
Website | QA/Test Days |
IRC | #fedora-test-day (webirc) #fedora-devel (webirc) |
Mailing list | test |
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]
- dnf reinstall is broken
- -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
- Even there, it is known to have side effects and strange consequences
- Recently it was learned that there's a broken icon on jdk8: missing icon in Xfce's applications menu; policytool only: "#ARCH#" in name and comment of desktop file
How to test?[edit]
Application form[edit]
http://testdays.fedorainfracloud.org/events/48
Basic cases[edit]
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)
sudo dnf install java-devel
- have it installed JDK you expected?
- is java and javac on path and 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)
sudo dnf install java-openjdk
- have it installed JRE you expected?
- is java on path and working?
- are java applications working?
- do you miss something?
- similarly for java-openjdk-devel as with 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-11-openjdk
- have it installed JRE you expected?
- is java on path and working?
- are java applications working?
- do you miss something?
- similarly for java-11-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-1.8.0-openjdk
- have it installed JRE you expected?
- is java on path and working?
- are java applications working?
- 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
- should install nothing on f29
- if it does, it is a bug
- should install on f28, but please donot
sudo dnf install icedtea-web
- is javaws on path and working?
- are alternatives sane? (see lower)
sudo dnf update $JDK
sudo dnf remove $JDK
- 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
- will select the tooling acocrding by masters from above
- except programs on PATH, also direcotries in /usr/lib/jvm are shufled. Please observe!
alternatives --display $MASTER
- will show current setup for given master
Headless JRE[edit]
- 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 javadoc or sources, operate with ...-src, -javadoc and javadoc-zip subpackage in above examples
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.
- 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[edit]
Your java and javaws is affected by system crypto policy.
update-crypto-policies --show
- will should you current
sudo update-crypto-policies --set DEFAULT
- will set standart policy
- many javaws or https applications may cause to work
sudo update-crypto-policies --set LEGACY
- will allow insecure algorithms
- is your failing javaws or https applications fixed?
sudo update-crypto-policies --set FUTURE
- will harden your computer
- nearly no javaws or https application will remain working
Shenandoah[edit]
- jdk8 and jdk11 have new garabge collector (on x86_64 and aarch64)
- you can use it via:
java -XX:+UseShenandoahGC ohter_params_as_ususal
- or set it up globally:
export JAVA_TOOL_OPTIONS="-XX:+UseShenandoahGC $JAVA_TOOL_OPTIONS"
- are you applications working with Shenandoah?
- are they working better?
JAVA_HOME[edit]
- See https://fedoraproject.org/wiki/Changes/Decouple_system_java_setting_from_java_command_setting for more details.
- JAVA_HOME is partially deprecated, partially very common environment variable for java programmers and admins.
- As fedora user, you should not be facing it.
- 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.
- 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
- this is tricky to verify. Are you sure?
- 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.
- 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 | ||||||||
nabooengineer | Fedora-Workstation-Live-x86_64-29_Beta-1.5 + Updates |
| |||||||
spathare | Fedora 29 Workstation x86_64 | ||||||||
stooke |
| ||||||||
stooke | Fedora-Workstation-Live-x86_64-29_Beta-1.5 + Updates |
Multiple installs[edit]
switch JRE/JDK[edit]
User | Profile | swtich JRE/JDK | References |
---|---|---|---|
nabooengineer | Fedora-Workstation-Live-x86_64-29_Beta-1.5 + Updates |
| |
spathare | Fedora 29 Workstation x86_64 | ||
stooke | Fedora-Workstation-Live-x86_64-29_Beta-1.5 + Updates |
|
crypto config[edit]
User | Profile | system wide | References |
---|---|---|---|
nabooengineer | Fedora-Workstation-Live-x86_64-29_Beta-1.5 + Updates |
| |
spathare | Fedora 29 Workstation x86_64 | ||
stooke | Fedora-Workstation-Live-x86_64-29_Beta-1.5 + Updates |
Shenandoah[edit]
User | Profile | GC testing | References |
---|---|---|---|
nabooengineer | Fedora-Workstation-Live-x86_64-29_Beta-1.5 + Updates |
|
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 | |||||||
stooke | Fedora-Workstation-Live-x86_64-29_Beta-1.5 + Updates |
|