Error:could not create the Java Virtual Machine Error:A fatal exception has occured.Program will exit

We Are Going To Discuss About Error:could not create the Java Virtual Machine Error:A fatal exception has occured.Program will exit. So lets Start this Java Article.

Error:could not create the Java Virtual Machine Error:A fatal exception has occured.Program will exit

  1. Error:could not create the Java Virtual Machine Error:A fatal exception has occured.Program will exit

    I think you have put command like java -VERSION. This is in capital letters
    You need to put all command in lowercase letters

  2. could not create the Java Virtual Machine Error:A fatal exception has occured.Program will exit

    I think you have put command like java -VERSION. This is in capital letters
    You need to put all command in lowercase letters

Solution 1

I think you have put command like java -VERSION. This is in capital letters
You need to put all command in lowercase letters

javac -version
java -version

All characters must be in lowercase letter

Original Author Dhaval Dalsania Of This Content

Solution 2

I was facing a similar issue. Actually the command is :

java -version and not java --version.

You will get output something like this:

java version "1.8.0_162"
Java(TM) SE Runtime Environment (build 1.8.0_162-b12)
Java HotSpot(TM) 64-Bit Server VM (build 25.162-b12, mixed mode)

Original Author Saumya Agnihotri Of This Content

Solution 3

Java 8:

java -version

Java 9+:

java --version

Original Author codingjeremy Of This Content

Solution 4

the command should be java -version

Original Author Veli Mpinda Of This Content

Conclusion

So This is all About This Tutorial. Hope This Tutorial Helped You. Thank You.

Also Read,

Siddharth

I am an Information Technology Engineer. I have Completed my MCA And I have 4 Year Plus Experience, I am a web developer with knowledge of multiple back-end platforms Like PHP, Node.js, Python and frontend JavaScript frameworks Like Angular, React, and Vue.

Leave a Comment