2
0

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 3 years have passed since last update.

Java8と11のversion切り替え後、確認でエラーが発生する

Posted at

##前提
初めてQiita投稿します。よろしくお願いします。
現在のJavaのversionが11。8に切り替えるためpathの設定を行った。
##問題
version確認

エラー

--version
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.

##解決
ググるとコマンドが間違ってますと出てきた。
え...11これで確認できたけど...となり今度は

で実行。すると

openjdk version "1.8.0_252"
```と表示された。

逆(8→11)でpathを変え、java -versionを行ったところ、こちらも正常に表示された。
java -versionで覚えることにした。原因は...わかりません(初心者)
2
0
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
2
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?