17
9

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.

javaのバージョン確認方法

Posted at

##cmdでjavaのバージョンを表示させる方法

javaというコマンドを入力すると1.8.0_201というバージョンのjavaを使用している事がわかる。

> java -version
java version "1.8.0_201"
Java(TM) SE Runtime Environment (build 1.8.0_201-b09)
Java HotSpot(TM) 64-Bit Server VM (build 25.201-b09, mixed mode)

javaコマンドの実体ファイルのパスを調べるためには以下のコマンドを実行する。

> where java
C:\Program Files (x86)\Common Files\Oracle\Java\javapath\java.exe
C:\ProgramData\Oracle\Java\javapath\java.exe
C:\Program Files\Java\jre1.8.0_201\bin\java.exe

環境変数JAVA_HOMEに設定されているパスを表示する。

> echo %JAVA_HOME%
C:\Program Files\Java\jre1.8.0_201
17
9
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
17
9

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?