Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
# dynamically get JAVA_HOME on Fedora, CentOS, RHEL
JAVA_HOME=`alternatives --display java | sed -n 's/^Current .best. version is \(.*\)\/bin\/java\.$/\1/p'`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment