Description of problem: Missing slave configuration for java-11-openjdk-devel package tooling. Version-Release number of selected component (if applicable): $ java -version openjdk version "11.0.9.1" 2020-11-04 OpenJDK Runtime Environment 18.9 (build 11.0.9.1+1) OpenJDK 64-Bit Server VM 18.9 (build 11.0.9.1+1, mixed mode, sharing) $ How reproducible: always Steps to Reproduce: 1. dnf install -y java-11-openjdk-devel 2. jps 3. Actual results: $ jps bash: jps: command not found... Failed to search for file: GDBus.Error:org.freedesktop.DBus.Error.NameHasNoOwner: Could not activate remote peer. $ Expected results: $ /usr/lib/jvm/java-11-openjdk/bin/jps 23711 Jps $ Additional info: When poking around the java-11-openjdk spec file I notice the command to configure alternatives differs between headless and devel. $ cat *.spec | grep -e --install -e --slave -e post_ |grep -B 1 install # you can list those files, with appropriate sections: cat *.spec | grep -e --install -e --slave -e post_ -- %define post_headless() %{expand: --install %{_bindir}/java java %{jrebindir -- %{?1}}/java $PRIORITY --family %{name}.%{_arch} \\ -- --slave %{_mandir}/man1/unpack200.1$ext unpack200.1$ext \\ alternatives --install %{_jvmdir}/jre-"$X" jre_"$X" %{_jvmdir}/%{sdkdir -- %{?1}} $PRIORITY --family %{name}.%{_arch} update-alternatives --install %{_jvmdir}/jre-%{javaver}-%{origin} jre_%{javaver}_%{origin} %{_jvmdir}/%{jrelnk -- %{?1}} $PRIORITY --family %{name}.%{_arch} %define post_devel() %{expand: --install %{_bindir}/javac javac %{sdkbindir -- %{?1}}/javac $PRIORITY --family %{name}.%{_arch} \\ -- --slave %{_mandir}/man1/serialver.1$ext serialver.1$ext \\ --install %{_jvmdir}/java-"$X" java_sdk_"$X" %{_jvmdir}/%{sdkdir -- %{?1}} $PRIORITY --family %{name}.%{_arch} update-alternatives --install %{_jvmdir}/java-%{javaver}-%{origin} java_sdk_%{javaver}_%{origin} %{_jvmdir}/%{sdkdir -- %{?1}} $PRIORITY --family %{name}.%{_arch} %define post_javadoc() %{expand: --install %{_javadocdir}/java javadocdir %{_javadocdir}/%{uniquejavadocdir -- %{?1}}/api \\ %define post_javadoc_zip() %{expand: --install %{_javadocdir}/java-zip javadoczip %{_javadocdir}/%{uniquejavadocdir -- %{?1}}.zip \\ $ On the one hand headless is using java whereas devel uses javac as the master symbolic name. My expectation when devel package is installed there should be multiple alternatives --add-slave commands to update the previously installed headless java package. for example when I do this $ sudo alternatives --add-slave java /usr/lib/jvm/java-11-openjdk-11.0.9.11-4.fc33.x86_64/bin/java /usr/bin/jps jps /usr/lib/jvm/java-11-openjdk-11.0.9.11-4.fc33.x86_64/bin/jps [sudo] password for whitingjr: $ jps 24837 Jps 6748 jedit.jar 20911 org.eclipse.equinox.launcher_1.5.800.v20200727-1323.jar $ after running the alternatives command the jps tool is recognized by the platform.
Created attachment 1755705 [details] Diff file containing changes to install alternatives follower (slave) for each sub-command. A diff file with changes to the spec file.
Hi! I can not reproduce the jps issue you are encountering. After all - if javac master would stop working, that would stop the world. There is known issue with reinstall - https://bugzilla.redhat.com/show_bug.cgi?id=1200302 workaround is to run reinstall again. Your system must have been somehow misconfiguration, or something went wild during move of jdk11 to mian JDK - https://fedoraproject.org/wiki/Changes/Java11 The java and javac masters are intentionally separated. On java master are JRE slaves, on javac master are JDK slaves. jps is hard to say why, part of JDK. So to use it you need to install java-11-openjdk-devel as you are doing, and select it via javac master. Why it is not preselected on your setup is really weird. Have you tried clean VM/chroot? As I'm saying something, I'm unable to reproduce. So some missconfiguraton had to happen on your system. Eg any other java?
While misconfiguration is always a possibility :) I suspect the install of the package must have borked. This might be way back when the F33 image was originally cut. I did a fresh F33 install in Nov 2020. I can find no alternatives javac master on my system. $ sudo alternatives --display javac [sudo] password for whitingjr: failed to read link /usr/bin/javac: No such file or directory $ I'll add as an attachment my alternatives on F33 for java. Next I'll attempt a reinstall of devel.
Created attachment 1755776 [details] java alternatives on system ok, this shows the jdk being mapped to is jdk17 with loom. but the net effect is the same when executing commands configured with alternatives.
Re-installing the devel package solved the problem. The javac command now has 2 alternatives. I am happy for this issue to be closed.
If the reinstall helped, then I think the https://bugzilla.redhat.com/show_bug.cgi?id=1200302 w was real cause. Sorry and ty!
(In reply to jiri vanek from comment #6) > If the reinstall helped, then I think the > https://bugzilla.redhat.com/show_bug.cgi?id=1200302 w was real cause. Sorry > and ty! Reinstall didn't work. But the workaround (downgrade then upgrade) in the comment https://bugzilla.redhat.com/show_bug.cgi?id=1200302#c76 worked for me. All sorted. Thank you.