https://bugzilla.redhat.com/show_bug.cgi?id=1098508
Bug ID: 1098508 Summary: all jpackage following lunchers are using by defalt JDK instead of JRE Product: Fedora Version: rawhide Component: jpackage-utils Severity: high Assignee: mizdebsk@redhat.com Reporter: jvanek@redhat.com QA Contact: extras-qa@fedoraproject.org CC: akurtako@redhat.com, java-sig-commits@lists.fedoraproject.org, jerboaa@gmail.com, mizdebsk@redhat.com, msrb@redhat.com, sochotni@redhat.com
Description of problem: When alternatives are used to change jre (alternatives --config java) the all jpackage compatible java apps, are still using the java specified by JDK (alternatives --config javac)
This is wrong. Especially for case when I have one JDK and one JRE. Then I can use alternatives as , and still only JDK will be selected. Version-Release number of selected component (if applicable): All fedoras and rhels till now
How reproducible:
Steps to Reproduce on f20: 1. $ install java-1.7.0-openjdk-devel, and java-1.8.0-oepnjdk 2. $ alternatives --configure java 3. select java 8 4. # run some packed java app
Expected results: java8 will be used
Actual results: java 7 is still used To use java 8 you ust install java-1.8.0-openjdk-devel and select java 8 via $alternatives --config javac
Additional info: Currently jpackage-utils are using JDK by default. Any app which wonts to use only JRE must specifi _prefer_jre=true to luncher. Well this is wrong in design. All apps should use JRE by default, and only few (10?) apps using whole JDK should specifi _prefer_jre=false.
Another workarouds ae set JAVA_HOME or edit /etc/java/java.conf But htose are far away from compfortable alternatives solution.
As reason not to do the change was introduced ant - that it needs whole JDK to run. IMHO it is one of the few apps which should specifu _prefer_jre=false...
Fix is quite simple Change /usr/share/java-utils/java-functions to use /usr/lib/jvm/jre instead of /usr/lib/java
However, the consequences may be really huge.
https://bugzilla.redhat.com/show_bug.cgi?id=1098508
jiri vanek jvanek@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Blocks| |1098509
Referenced Bugs:
https://bugzilla.redhat.com/show_bug.cgi?id=1098509 [Bug 1098509] all jpackage following lunchers are using by defalt JDK instead of JRE
https://bugzilla.redhat.com/show_bug.cgi?id=1098508
Florian Weimer fweimer@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Summary|all jpackage following |all jpackage following |lunchers are using by |launchers are using by |defalt JDK instead of JRE |defalt JDK instead of JRE
https://bugzilla.redhat.com/show_bug.cgi?id=1098508
Mikolaj Izdebski mizdebsk@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |FutureFeature Priority|unspecified |low Severity|high |low
Red Hat Bugzilla bugzilla@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Doc Type|Bug Fix |Enhancement
https://bugzilla.redhat.com/show_bug.cgi?id=1098508
Mikolaj Izdebski mizdebsk@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords|FutureFeature | CC| |jvanek@redhat.com, | |mat.booth@redhat.com, | |msimacek@redhat.com Component|jpackage-utils |javapackages-tools Doc Type|Enhancement |Bug Fix Flags| |needinfo?(jvanek@redhat.com | |)
--- Comment #1 from Mikolaj Izdebski mizdebsk@redhat.com --- jpackage-utils has been replaced with javapackages-tools, moving to appropriate component.
This is intentional behavior. If both JRE and JDK are installed then *by default* JDK will be used, regardless of version. Applications that don't require JDK features and can work with plain JRE can (and should) set _prefer_jre=true, in which case JRE is always used, if installed.
This will be closed as NOTABUG unless you can convince me otherwise.
https://bugzilla.redhat.com/show_bug.cgi?id=1098508
jiri vanek jvanek@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Flags|needinfo?(jvanek@redhat.com | |) |
--- Comment #2 from jiri vanek jvanek@redhat.com --- Yes. I agree. After many many discussions about this, sure. You are the head here :)
Maybe nit - set _prefer_jre=true - should be probably highlighted in java packaging guidelines.
https://bugzilla.redhat.com/show_bug.cgi?id=1098508
Mikolaj Izdebski mizdebsk@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |CLOSED Resolution|--- |NOTABUG Last Closed| |2015-03-16 07:26:44
--- Comment #3 from Mikolaj Izdebski mizdebsk@redhat.com --- (In reply to jiri vanek from comment #2)
Maybe nit - set _prefer_jre=true - should be probably highlighted in java packaging guidelines.
This is already documented well enough IMO:
"One thing to pay attention to is the 6th argument to it - whether to prefer a JRE over a full SDK when looking up a JVM to invoke - most packages that don’t require the full Java SDK will want to set that to true to avoid unexpected results when looking up a JVM when some of the installed JRE’s don’t have the corresponding SDK (*-devel package) installed."
(from https://fedorahosted.org/released/javapackages/doc/#_generating_application_...)
Closing as NOTABUG.
java-sig-commits@lists.fedoraproject.org