Sửa lỗi could not create the java virtual machine
I have just installed Java SE Development Kit 8u91 on my 64 bit Windows-10 OS. I set my path variables . I tried java --version in my command prompt it gave me an error.
But when i tried java -version it worked. I tried initializing _JAVA_OPTIONS environment variable and ever tried re-installation none of them worked. Can any one help me please? asked May 12, 2016 at 11:57 4 I think you have put command like
1. This is in capital letters You need to put all command in lowercase letters
All characters must be in lowercase letter answered May 18, 2017 at 8:17 Dhaval DalsaniaDhaval Dalsania 1,0791 gold badge8 silver badges3 bronze badges 3 I was facing a similar issue. Actually the command is :
You will get output something like this:
M.K 1,4772 gold badges24 silver badges47 bronze badges answered Jan 26, 2020 at 19:47 Java 8:
Java 9+:
answered Feb 19, 2021 at 19:07 codingjeremycodingjeremy 5,3951 gold badge36 silver badges39 bronze badges the command should be java -version answered Nov 13, 2017 at 11:43 Veli MpindaVeli Mpinda 4354 silver badges3 bronze badges Try executing below command,
It gives option as, -version print product version and exit java -version is the correct command to execute answered May 12, 2016 at 12:05 Ankur SinghalAnkur Singhal 26.2k16 gold badges84 silver badges118 bronze badges
2 is a valid option from JDK 9 and it is not a valid option until JDK 8 hence you get the below:
You can try installing JDK 9 or any version later and check for
3 it will work. Alternately, from the installed JDK 9 or later versions you can see from
4 the below two options will be available:
where as in JDK 8 you will only have below when you execute
4
I hope it answers your question. answered Oct 19, 2019 at 12:30 This happens because the CMD doesn't recognize the "java --version" try writing "java -version" when "java --version" it tries to create a JVM. IT Fails because that's wrong command. |