RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1173503 - java-1.8.0-openjdk is not automatically recognized as better option for alternatives than java-1.7.0-openjdk
Summary: java-1.8.0-openjdk is not automatically recognized as better option for alter...
Keywords:
Status: CLOSED DUPLICATE of bug 1251560
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: java-1.8.0-openjdk
Version: 6.6
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: rc
: ---
Assignee: jiri vanek
QA Contact: BaseOS QE - Apps
URL:
Whiteboard:
Depends On:
Blocks: 1245238
TreeView+ depends on / blocked
 
Reported: 2014-12-12 10:02 UTC by Frantisek Reznicek
Modified: 2019-12-16 04:36 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1245238 (view as bug list)
Environment:
Last Closed: 2015-08-10 12:44:04 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Terminal transcript (3.18 KB, text/plain)
2014-12-12 10:05 UTC, Frantisek Reznicek
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1150589 1 None None None 2021-01-20 06:05:38 UTC

Internal Links: 1150589

Description Frantisek Reznicek 2014-12-12 10:02:07 UTC
Description of problem:

java-1.8.0-openjdk is not automatically recognized as betetr option for alternatives than java-1.7.0-openjdk.

Alternatives comes with 'best' version which together with jvm/jdk alternatives priority helps to set 'best' jvm/jdk to use.

The customers may expect that jvm/jdk is always upgraded to best choice when installing higher jvm/jdk, see scenario below



Version-Release number of selected component (if applicable):
# rpm -qa | grep ^java-1
java-1.8.0-openjdk-1.8.0.25-3.b17.el6_6.x86_64
java-1.8.0-openjdk-headless-1.8.0.25-3.b17.el6_6.x86_64
java-1.8.0-openjdk-devel-1.8.0.25-3.b17.el6_6.x86_64

java-1.5.0-gcj-1.5.0.0-29.1.el6.x86_64
java-1.6.0-openjdk-1.6.0.33-1.13.5.1.el6_6.x86_64
java-1.7.0-openjdk-1.7.0.71-2.5.3.1.el6.x86_64
java-1.7.0-openjdk-devel-1.7.0.71-2.5.3.1.el6.x86_64
java-1.6.0-openjdk-devel-1.6.0.33-1.13.5.1.el6_6.x86_64


How reproducible:
100%

Steps to Reproduce:
1. yum install java-1.5.0-gcj-devel
2. alternatives --display java shows java-1.5.0-gcj link
3. yum install java-1.6.0-openjdk-devel
4. alternatives --display java shows java-1.6.0-openjdk link
5. yum install java-1.7.0-openjdk-devel
6. alternatives --display java shows java-1.7.0-openjdk link
7. yum install java-1.8.0-openjdk-devel
8. alternatives --display java should show java-1.8.0-openjdk link but shows java-1.7.0-openjdk link

Note: no manual alternatives manipulation done in the current testing scenario.


Actual results:
Installing java-1.8.0-openjdk-devel do not switch default alternatives to ava-1.8.0-openjdk*

Expected results:
Installing java-1.8.0-openjdk-devel switches default alternatives to ava-1.8.0-openjdk* (if there is no higher one)

Comment 1 Frantisek Reznicek 2014-12-12 10:05:05 UTC
Created attachment 967539 [details]
Terminal transcript

Comment 3 jiri vanek 2014-12-18 18:37:27 UTC
Sure. Priority is set to 0 for jdk8 in rhel6.

This is candidate to not a bug.

Comment 4 jiri vanek 2014-12-19 10:13:46 UTC
This is intentional behaviour. In rhel6 jdk 8 is, and probably remains, tech preview.  For rhel7, the behaviour is same right now. But may be suspect of change.

Comment 5 Piyush Bhoot 2015-07-21 12:04:18 UTC
Hi team,

JDK 8 is no more tech preview. Time to rethink this behaviour?

Best Regards,
Piyush

Comment 6 jiri vanek 2015-07-21 12:33:00 UTC
Not so sure for rhel6....

Comment 7 Deepak Bhole 2015-07-21 13:36:19 UTC
It's been there for a while, and we are soon going to make OpenJDK8 the default for IcedTea-Web everywhere, so I think it is safe to set the priority higher than 7 for the next release.

Comment 8 Deepak Bhole 2015-07-21 13:37:10 UTC
(In reply to Deepak Bhole from comment #7)
> It's been there for a while, and we are soon going to make OpenJDK8 the
> default for IcedTea-Web everywhere, so I think it is safe to set the
> priority higher than 7 for the next release.

This will only be for java provides of course, not java-devel, which will stay at java8-devel

Comment 9 jiri vanek 2015-07-21 14:27:31 UTC
to late for 6.7 but for 6.8 (and 7.2?) I will align priority to regualr openjdk one then. (https://bugzilla.redhat.com/show_bug.cgi?id=1189084)

Comment 10 Andrew John Hughes 2015-07-21 18:45:21 UTC
I'd say any move to make OpenJDK 8 the default JVM should depend on OpenJDK 8 having ECC support:

https://bugzilla.redhat.com/show_bug.cgi?id=1208307

OpenJDK 7 has this as of 6.7 so I don't think we should start preferring OpenJDK 8 over that unless it can provide the same functionality.

Generally, we should also ensure that bug fixes don't regress from 7 to 8.

Comment 11 Deepak Bhole 2015-07-22 15:31:34 UTC
(In reply to Andrew John Hughes from comment #10)
> I'd say any move to make OpenJDK 8 the default JVM should depend on OpenJDK
> 8 having ECC support:
> 
> https://bugzilla.redhat.com/show_bug.cgi?id=1208307
> 
> OpenJDK 7 has this as of 6.7 so I don't think we should start preferring
> OpenJDK 8 over that unless it can provide the same functionality.
> 
> Generally, we should also ensure that bug fixes don't regress from 7 to 8.

The higher priority only comes into play if alternative link is set to auto mode. Almost all production systems would be expected to set the link manually. Manual links will not be changed if a higher priority JDK is installed.

Comment 12 Deepu K S 2015-07-24 12:20:46 UTC
Hello Jiri,

As a workaround, can we manually edit the '/var/lib/alternatives/java' file and increase the priority for java-1.8.0-openjdk.

Like adding the value as, 
/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.51-0.b16.el6_6.x86_64/jre/bin/java
180051


# alternatives --config java

There are 11 programs which provide 'java'.

  Selection    Command
-----------------------------------------------
   1           /usr/lib/jvm/jre-1.7.0-openjdk.x86_64/bin/java
   2           /usr/lib/jvm/jre-1.5.0-gcj/bin/java
   3           /usr/lib/jvm/jre-1.7.0-oracle.x86_64/bin/java
   4           /usr/java/jre1.7.0_67/bin/java
   5           /usr/lib/jvm/jre-1.8.0-oracle.x86_64/bin/java
   6           /usr/lib/jvm/jre-1.6.0-sun.x86_64/bin/java
   7           /usr/lib/jvm/jre-1.6.0-sun/bin/java
   8           /usr/java/jre1.8.0_20/bin/java
   9           /usr/java/jre1.7.0_79/bin/java
*+ 10          /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.51-0.b16.el6_6.x86_64/jre/bin/java
   11          /usr/lib/jvm/jre-1.6.0-openjdk.x86_64/bin/java

Enter to keep the current selection[+], or type selection number:

Thanks.

Comment 13 jiri vanek 2015-08-10 12:44:04 UTC

*** This bug has been marked as a duplicate of bug 1251560 ***


Note You need to log in before you can comment on or make changes to this bug.