1
5

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.

インストールされているJDKのバージョンと有効になっているJDKのバージョンを確認する

Posted at

1. インストールされているJDKのバージョンを確認する

以下のコマンドを実行します。

/usr/libexec/java_home -V

実行結果

$ /usr/libexec/java_home -V
Matching Java Virtual Machines (3):
    12.0.1, x86_64:	"AdoptOpenJDK 12"	/Library/Java/JavaVirtualMachines/adoptopenjdk-12.jdk/Contents/Home
    11.0.3, x86_64:	"AdoptOpenJDK 11"	/Library/Java/JavaVirtualMachines/adoptopenjdk-11.jdk/Contents/Home
    1.8.0_212, x86_64:	"AdoptOpenJDK 8"	/Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home

2. 有効になっているJDKのバージョンを確認する

以下のコマンドを実行します。

java -version

実行結果

$ java -version
openjdk version "12.0.1" 2019-04-16
OpenJDK Runtime Environment AdoptOpenJDK (build 12.0.1+12)
OpenJDK 64-Bit Server VM AdoptOpenJDK (build 12.0.1+12, mixed mode, sharing)
1
5
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
1
5

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?