6
7

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

brew で Java をインストールして、jenv で管理する

Last updated at Posted at 2015-09-18

パッケージ管理に brew-cask を使います。
brew-cask,anyenv,jenv の使い方は、各自調べてください。

brew install caskroom/cask/brew-cask
brew tap caskroom/versions
brew cask info java
brew cask install java7
brew cask install java

java 1.6 は元々入ってる

anyenv で jenv をインストールしておく

anyenv install jenv
exec $SHELL -L

jenv に java ホームを追加する

jenv add /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
jenv add /Library/Java/JavaVirtualMachines/jdk1.7.0_79.jdk/Contents/Home
jenv add /Library/Java/JavaVirtualMachines/jdk1.8.0_51.jdk/Contents/Home
jenv global oracle64-1.8.0.51
6
7
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
6
7

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?