Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in Java by (13.1k points)

I was trying to check the java version using command line and I get this error:

Unrecognized option: --version

Error: Could not create the Java virtual machine

Error: A fatal exception has occurred. Program will exit.

Can anyone help me with this?

1 Answer

0 votes
by (26.7k points)

Basically, since Java 11, you can use both the command as --version or -version, you need to update your JRE to the newest version and can try with both the commands.

I hope this will help.

Want to know more about Java? Prefer this tutorial on Java Tutorial.

Want to become a Java Expert? Join Java Training now!!

Browse Categories

...