How to solve could not create the virtual machine error of Java Virtual Machine Launcher?

Dnyani picture Dnyani · Aug 27, 2013 · Viewed 238.3k times · Source

I am working on java wicket framework and Apache tomcat. Here I have Problem when i tried
to start tomcat it shows Java Virtual Machine Launcher pop window "Could not create the
Java Virtual Machine".
After clicking on "OK" button on Pop window it shows the error on console.

Error occurred during initialization of VM.
Could not reserve enough space for object heap.

Please give me any reference or suggestions.
Thanks in Advance.

Answer

KARTHIKEYAN.A picture KARTHIKEYAN.A · Sep 18, 2016

Error:

sony@sony-VPCEH25EN:~$ java --version
Picked up JAVA_TOOL_OPTIONS: -javaagent:/usr/share/java/jayatanaag.jar 
Unrecognized option: --version
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.

Solution: Remove extra hyphen '-'

sony@sony-VPCEH25EN:~$ java -version
Picked up JAVA_TOOL_OPTIONS: -javaagent:/usr/share/java/jayatanaag.jar 
java version "1.8.0_101"
Java(TM) SE Runtime Environment (build 1.8.0_101-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.101-b13, mixed mode)