Java_installation
There is a description
-
Use Homebrew to install:
// install the latest version $ brew cask install java // for the certain version e.g. java8 $ brew cask install java8
-
Set the environment variable:
- check the
Installation directory
in Finder. e.g. /Library/Java/JavaVirtualMachines/jdk1.7.0_55.jdk/Contents/Home - vim ~./zshrc
export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.7.0_55.jdk/Contents/Home export CLASSPATH=$JAVA_HOME/lib/tools.jar:$JAVA_HOME/lib/dt.jar export PATH=$JAVA_HOME/bin:$PATH:
- source ~./zshrc
- check the