Created
October 30, 2021 12:14
-
-
Save Geolykt/0bee6c48b6bf0015302c47b1ea4da84f to your computer and use it in GitHub Desktop.
Set the Java Home based on the java defined by alternatives. Not the most efficent approach, but works on my machine (TM)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export JAVA_HOME=`alternatives --display java | grep "link currently points to" | tr ' ' '\n' | grep -o -P "[\\/].+" | sed -e "s/bin\/java//"` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment