Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unable to create java virtual machine

I am using Windows 10 64-bit. I have installed Oracle JDK8 64-bit and have setup the JAVA_HOME environment variable properly. When I run the command

java -v

it gives me the following error

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

I have tried setting the environment variable _JAVA_OPTIONS to -Xmx512M and -Xmx1024M but that does not solve the issue.

Any help would be appreciated.

Thanks


1 Answers

Java has no -v option. Instead use -version 

like image 105
litelite Avatar answered Dec 05 '25 20:12

litelite



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!