Thu. Mar 28th, 2024

Ever need to have JAVA_HOME set on RHEL, and find that it’s not?  Use these lines to set JAVA_HOME from you script file:

echo Setting JAVA_HOME to `alternatives --display java | head -2 | grep currently | awk '{print substr($0,27)}' | rev | cut -c 9- | rev`
export JAVA_HOME=`alternatives --display java | head -2 | grep currently | awk '{print substr($0,27)}' | rev | cut -c 9- | rev`

By Jeffery Miller

I am known for being able to quickly decipher difficult problems to assist development teams in producing a solution. I have been called upon to be the Team Lead for multiple large-scale projects. I have a keen interest in learning new technologies, always ready for a new challenge.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d