Bugzilla – Bug 1107342
JAVA_HOME incorrectly set by /etc/profile.d/alljava.*
Last modified: 2024-03-13 17:27:23 UTC
Created attachment 782101 [details] Patches for both the Bourne shell and the C shell. If custom java (e.g. Oracle) is installed and used via the "alternatives system" then /etc/profile.d/alljava.* wouldn't set the correct JAVA_HOME. So the user is in a situation where they have all links pointing to their custom java but the JAVA_HOME env var is set to whatever OpenJDK was installed before that. This causes nasty issues with all sorts of java tools and applications. Please find attached patches that add support for determining JAVA_HOME via /etc/alternatives/java if exists. The patches were tested with the latest Tumbleweed as of this writing.
alljava scripts in /etc/profile.d do indeed not honor the current alternative set for Java, which leads to unexpected results with Java tools making use of JAVA_HOME to determine which JRE/JDK to use. It would be great to have this fixed officially, as this is confusing.
Michael, thanks for your comment. Did you have a chance to try out the patches?
After installing java-16-openjdk the JAVA_HOME is pointed to /usr/lib64/jvm/java Which simply doesn't exist. Shouldn't it point to the /usr/lib64/jvm/jre?
Factory/TW: https://github.com/openSUSE/aaa_base/pull/133 SLE-15: created request id 307713
SUSE-RU-2023:4154-1: An update that has two fixes can now be installed. Category: recommended (moderate) Bug References: 1107342, 1215434 Sources used: SUSE Manager Retail Branch Server 4.2 (src): aaa_base-84.87+git20180409.04c9dae-150300.10.6.2 SUSE Manager Server 4.2 (src): aaa_base-84.87+git20180409.04c9dae-150300.10.6.2 SUSE Enterprise Storage 7.1 (src): aaa_base-84.87+git20180409.04c9dae-150300.10.6.2 SUSE Linux Enterprise Micro 5.2 (src): aaa_base-84.87+git20180409.04c9dae-150300.10.6.2 SUSE Linux Enterprise Micro for Rancher 5.2 (src): aaa_base-84.87+git20180409.04c9dae-150300.10.6.2 SUSE Linux Enterprise Micro for Rancher 5.3 (src): aaa_base-84.87+git20180409.04c9dae-150300.10.6.2 SUSE Linux Enterprise Micro 5.3 (src): aaa_base-84.87+git20180409.04c9dae-150300.10.6.2 SUSE Linux Enterprise Micro for Rancher 5.4 (src): aaa_base-84.87+git20180409.04c9dae-150300.10.6.2 SUSE Linux Enterprise Micro 5.4 (src): aaa_base-84.87+git20180409.04c9dae-150300.10.6.2 SUSE Linux Enterprise Micro 5.5 (src): aaa_base-84.87+git20180409.04c9dae-150300.10.6.2 Basesystem Module 15-SP4 (src): aaa_base-84.87+git20180409.04c9dae-150300.10.6.2 Basesystem Module 15-SP5 (src): aaa_base-84.87+git20180409.04c9dae-150300.10.6.2 Development Tools Module 15-SP4 (src): aaa_base-84.87+git20180409.04c9dae-150300.10.6.2 Development Tools Module 15-SP5 (src): aaa_base-84.87+git20180409.04c9dae-150300.10.6.2 SUSE Linux Enterprise High Performance Computing ESPOS 15 SP3 (src): aaa_base-84.87+git20180409.04c9dae-150300.10.6.2 SUSE Linux Enterprise High Performance Computing LTSS 15 SP3 (src): aaa_base-84.87+git20180409.04c9dae-150300.10.6.2 SUSE Linux Enterprise Server 15 SP3 LTSS 15-SP3 (src): aaa_base-84.87+git20180409.04c9dae-150300.10.6.2 SUSE Linux Enterprise Server for SAP Applications 15 SP3 (src): aaa_base-84.87+git20180409.04c9dae-150300.10.6.2 SUSE Manager Proxy 4.2 (src): aaa_base-84.87+git20180409.04c9dae-150300.10.6.2 NOTE: This line indicates an update has been released for the listed product(s). At times this might be only a partial fix. If you have questions please reach out to maintenance coordination.
SUSE-RU-2024:0322-1: An update that has two fixes can now be installed. Category: recommended (moderate) Bug References: 1107342, 1215434 Sources used: openSUSE Leap 15.3 (src): aaa_base-84.87+git20180409.04c9dae-150300.10.9.1 openSUSE Leap Micro 5.3 (src): aaa_base-84.87+git20180409.04c9dae-150300.10.9.1 openSUSE Leap Micro 5.4 (src): aaa_base-84.87+git20180409.04c9dae-150300.10.9.1 openSUSE Leap 15.5 (src): aaa_base-84.87+git20180409.04c9dae-150300.10.9.1 SUSE Linux Enterprise Micro for Rancher 5.3 (src): aaa_base-84.87+git20180409.04c9dae-150300.10.9.1 SUSE Linux Enterprise Micro 5.3 (src): aaa_base-84.87+git20180409.04c9dae-150300.10.9.1 SUSE Linux Enterprise Micro for Rancher 5.4 (src): aaa_base-84.87+git20180409.04c9dae-150300.10.9.1 SUSE Linux Enterprise Micro 5.4 (src): aaa_base-84.87+git20180409.04c9dae-150300.10.9.1 SUSE Linux Enterprise Micro 5.5 (src): aaa_base-84.87+git20180409.04c9dae-150300.10.9.1 Basesystem Module 15-SP5 (src): aaa_base-84.87+git20180409.04c9dae-150300.10.9.1 Development Tools Module 15-SP5 (src): aaa_base-84.87+git20180409.04c9dae-150300.10.9.1 SUSE Linux Enterprise High Performance Computing LTSS 15 SP3 (src): aaa_base-84.87+git20180409.04c9dae-150300.10.9.1 SUSE Linux Enterprise High Performance Computing ESPOS 15 SP4 (src): aaa_base-84.87+git20180409.04c9dae-150300.10.9.1 SUSE Linux Enterprise High Performance Computing LTSS 15 SP4 (src): aaa_base-84.87+git20180409.04c9dae-150300.10.9.1 SUSE Linux Enterprise Desktop 15 SP4 LTSS 15-SP4 (src): aaa_base-84.87+git20180409.04c9dae-150300.10.9.1 SUSE Linux Enterprise Server 15 SP3 LTSS 15-SP3 (src): aaa_base-84.87+git20180409.04c9dae-150300.10.9.1 SUSE Linux Enterprise Server 15 SP4 LTSS 15-SP4 (src): aaa_base-84.87+git20180409.04c9dae-150300.10.9.1 SUSE Linux Enterprise Server for SAP Applications 15 SP3 (src): aaa_base-84.87+git20180409.04c9dae-150300.10.9.1 SUSE Linux Enterprise Server for SAP Applications 15 SP4 (src): aaa_base-84.87+git20180409.04c9dae-150300.10.9.1 SUSE Manager Proxy 4.3 (src): aaa_base-84.87+git20180409.04c9dae-150300.10.9.1 SUSE Manager Retail Branch Server 4.3 (src): aaa_base-84.87+git20180409.04c9dae-150300.10.9.1 SUSE Manager Server 4.3 (src): aaa_base-84.87+git20180409.04c9dae-150300.10.9.1 SUSE Enterprise Storage 7.1 (src): aaa_base-84.87+git20180409.04c9dae-150300.10.9.1 SUSE Linux Enterprise Micro 5.2 (src): aaa_base-84.87+git20180409.04c9dae-150300.10.9.1 SUSE Linux Enterprise Micro for Rancher 5.2 (src): aaa_base-84.87+git20180409.04c9dae-150300.10.9.1 NOTE: This line indicates an update has been released for the listed product(s). At times this might be only a partial fix. If you have questions please reach out to maintenance coordination.