mirror of
https://github.com/meineerde/dotfiles.git
synced 2026-02-05 16:43:22 +00:00
Add jhome helper to set the JAVA_HOME for a specific version in the environment
This commit is contained in:
parent
80ff4b6677
commit
6c1c0499ed
11
.bashrc
11
.bashrc
@ -91,6 +91,17 @@ case `uname` in
|
||||
. "$(brew --prefix)/etc/bash_completion"
|
||||
fi
|
||||
|
||||
# Set the JAVA_HOME environment variable to the correct versob
|
||||
jhome() {
|
||||
if [ "$#" -ge 1 ]; then
|
||||
export JAVA_HOME="$(/usr/libexec/java_home -v "$@")"
|
||||
else
|
||||
export JAVA_HOME="$(/usr/libexec/java_home)"
|
||||
fi
|
||||
echo "JAVA_HOME:" "$JAVA_HOME"
|
||||
java -version
|
||||
}
|
||||
|
||||
;;
|
||||
Linux)
|
||||
PATH=$PATH:/var/lib/gems/1.8/bin:/var/lib/gems/1.9/bin
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user