Skip to content

Instantly share code, notes, and snippets.

@benman1
Created July 30, 2019 13:22
Show Gist options
  • Save benman1/100043c5754bf45072513a6db2b251e1 to your computer and use it in GitHub Desktop.
Save benman1/100043c5754bf45072513a6db2b251e1 to your computer and use it in GitHub Desktop.
automatically determine JAVA_HOME
java_exec=$(readlink -f `which javac`)
export JAVA_HOME="${java_exec::-10}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment