Qiita Teams that are logged in
You are not logged in to any team

Log in to Qiita Team
Community
OrganizationEventAdvent CalendarQiitadon (β)
Service
Qiita JobsQiita ZineQiita Blog
78
Help us understand the problem. What are the problem?

More than 5 years have passed since last update.

@yanap

macにjava8をインストール

macにjava8をインストール

環境

現在の状態

Mac Book Air
OS X Yosemite

brew で install

現在はbrewで入れたjava7がインストールされている状態

java8 インストール 手順

1. brewを更新

brew update && brew cleanup

2. java8インストール

brew cask install java

3. インストールされてる全てのバージョンを確認

/usr/libexec/java_home -V
Matching Java Virtual Machines (2):
    1.8.0_74, x86_64:   "Java SE 8" /Library/Java/JavaVirtualMachines/jdk1.8.0_74.jdk/Contents/Home
    1.7.0_72, x86_64:   "Java SE 7" /Library/Java/JavaVirtualMachines/jdk1.7.0_72.jdk/Contents/Home

/Library/Java/JavaVirtualMachines/jdk1.8.0_74.jdk/Contents/Home

4. .bash_profileとか.zshrcに書く

export JAVA_HOME=`/usr/libexec/java_home -v 1.8`

5. 設定したバージョンを確認

java -version 

6. 消すとき

sudo rm -rf /Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
78
Help us understand the problem. What are the problem?