java-update-alternatives doesn't recognize jdkhl label

Bug #1603692 reported by Paul Smith
38
This bug affects 7 people
Affects Status Importance Assigned to Milestone
java-common
Fix Released
Unknown
java-common (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

java-common 0.56ubuntu2
openjdk-8-jre-headless:amd64 8u91-b14-0ubuntu4~16.04.1

Newer versions of openjdk-8-jre-headless provide a .jinfo file that uses a new tag "jdkhl" (for JDK headless). Since update-java-alternatives doesn't know anything about that tag, it ignores all those entries and leaves them set to Java 7.

I spend about 45 massively frustrating minutes trying to figure out what was going on before I realized that my javac was actually still Java 7 not Java 8 :(.

In addition to recognizing the new tag, I think that java-update-alternatives should be modified to at least generate warning messages for any tags that it doesn't recognize rather than failing silently and leaving one believing that one's Java version has been changed appropriately when it hasn't.

Tags: patch
Changed in java-common:
status: Unknown → Confirmed
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in java-common (Ubuntu):
status: New → Confirmed
Revision history for this message
Bastien Durel (bastien-durel) wrote :

works for oracle -> openjdk too

Revision history for this message
Bastien Durel (bastien-durel) wrote :

(I mean: "the bug affects me for oracle -> openjdk")

I wrote a trivial patch

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "uja.patch" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

tags: added: patch
Revision history for this message
Paul Smith (psmith-gnu) wrote :

Note that there's a more comprehensive patch already available in the linked Debian bug report (see the remote bug watches box to the right).

My hope would be someone would go even further and update the script to show some kind of warning, at least, if unknown tags are seen so that future updates to the set of tags are not silently ignored (I can do that myself if someone is interested).

Changed in java-common:
status: Confirmed → Fix Released
Revision history for this message
Wojciech Pokrzepa (sgnsajgon) wrote :

Why this bug still occurs in Ubuntu 17.04? Why patch haven't been applied to package yet?

Revision history for this message
kailoran (kailoran) wrote :

Ping?

I noticed the fix is present in debian stable, but is still not in ubuntu -- see https://packages.debian.org/search?keywords=java-common which is at 0.59. Ubuntu is at 0.56 / 0.57 (https://launchpad.net/ubuntu/+source/java-common); the fix appears to be included in 0.58.

Revision history for this message
HugoHirsch (ubuntubugs-aiki-it) wrote :

Ping?

This issue results in strange Travis build problems affecting potentially all Java builds:

https://travis-ci.community/t/chosen-jdk-for-build-is-not-honoured-as-javac-and-java-binaries-differ-in-versions/3591

Thanks.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.