Hello
I am running into an issue on my openSUSE Leap system where the JAVA_HOME environment variable is being ignored; even though I have set it correctly in both /etc/profile and .bashrc. ![]()
When I echo $JAVA_HOME, it shows the correct path (e.g., /usr/lib64/jvm/java-11-openjdk), but some applications like Maven / Tomcat still report that Java is not set or default back to the system version. I have also tried setting it with update-alternatives but no luck.
I made sure the Java version is installed & matches the expected architecture. Interestingly; a fresh user account does pick up the JAVA_HOME setting without issue. Could this be something related to systemd, login shells / some environment caching behavior in SUSE? ![]()
I am wondering if anyone else has had this issue & knows how to make the setting consistent across GUI apps, terminal sessions & services.
Checked https://forums.opensuse.org/t/setting-up-environment-variables/128241 related to this.
While trying to troubleshoot this; I also ended up reading about what is java and its history with cross-platform compatibility, which makes it even more surprising how setting it up can still be this inconsistent across Linux distributions. ![]()
Any suggestions or workarounds would be much appreciated.
Thank you !! ![]()