Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511
Rep:
No problem having 2 .. 4 versions. And don't set any "JAVA_HOME".
Use the "Redhat method" : The alternatives "version switcher".
1) su
2) /sbin/alternatives/ --config java
And if a new version has not been automatically added to /etc/alternatives,
a command like this will do :
/usr/sbin/alternatives --install /usr/bin/java java /usr/java/jre1.6.0/bin/java 20000
or /usr/sbin/alternatives --install /usr/bin/java java /usr/java/jdk1.6.0_26/bin/java 2 http://www.if-not-true-then-false.co...-red-hat-rhel/
The location etc. can be found with : ls /usr/java
IN that case: you might -- set the JAVA_HOME on the users profile, .bash_profile, or .bashrc (or as appropriate depending upon their shell) and add ${JAVA_HOME}/bin to the PATH for that user (in the same file).
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.