Help us understand the problem. What is going on with this article?

Java 11 (OpenJDK: AdoptOpenJDK) を Homebrew で macOS にインストールする

今回の環境

  • macOS Catalina 10.15.2

インストール

公式資料通りにインストールする。
GitHub - AdoptOpenJDK/homebrew-openjdk: AdoptOpenJDK HomeBrew Tap

$ brew tap AdoptOpenJDK/openjdk
$ brew cask install adoptopenjdk11

java_home コマンドでインストールされたディレクトリの場所を確認

$ /usr/libexec/java_home -v 11
/Library/Java/JavaVirtualMachines/adoptopenjdk-11.jdk/Contents/Home

環境変数 JAVA_HOME と PATH を設定

必要に応じて .bash_profile や .bashrc などに記述する。

export JAVA_HOME=/Library/Java/JavaVirtualMachines/adoptopenjdk-11.jdk/Contents/Home
PATH=${JAVA_HOME}/bin:${PATH}

インストールされた AdoptOpenJDK を確認

$ java -version
openjdk version "11.0.6" 2020-01-14
OpenJDK Runtime Environment AdoptOpenJDK (build 11.0.6+10)
OpenJDK 64-Bit Server VM AdoptOpenJDK (build 11.0.6+10, mixed mode)

$ javac -version
javac 11.0.6

$ which java
/Library/Java/JavaVirtualMachines/adoptopenjdk-11.jdk/Contents/Home/bin/java

$ which javac
/Library/Java/JavaVirtualMachines/adoptopenjdk-11.jdk/Contents/Home/bin/javac

$ ls /Library/Java/JavaVirtualMachines/adoptopenjdk-11.jdk/Contents/Home/bin/
jaotc       javap       jfr     jmap        jstat       rmiregistry
jar     jcmd        jhsdb       jmod        jstatd      serialver
jarsigner   jconsole    jimage      jps     keytool     unpack200
java        jdb     jinfo       jrunscript  pack200
javac       jdeprscan   jjs     jshell      rmic
javadoc     jdeps       jlink       jstack      rmid
niwasawa
迷子になりがちな地図・位置情報系プログラマ。
http://niwasawa.hatenablog.jp/
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
Comments
No comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  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
ユーザーは見つかりませんでした