Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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.

like image 432
Dnyani Avatar asked Aug 27 '13 07:08

Dnyani


People also ask

How do you solve error could not create the Java virtual machine error a fatal exception has occurred program will exit?

Right-click on java.exe and choose Properties. Then, go to the Compatibility tab and check the box associated with Run this program as an administrator (under Settings). Click Apply to save the changes.

What does error could not create Java virtual machine mean?

However, if there's something wrong with your setup, you may see the error, “Could not create the Java Virtual Machine.” This error means that the Java installation on your computer can't launch the virtual sandbox (virtual machine) within which it would typically launch the Java app.

Can't create Java Virtual Machine A fatal exception has occurred eclipse?

At 'java Properties" window select the Compatibility tab and below the Settings pane, check the box Run this program as an administrator. Then click Apply and OK. 5. Finally, start the program that cannot run because of the "Could Not Create the Java Virtual Machine" error and see if the problem persists.


2 Answers

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) 
like image 180
KARTHIKEYAN.A Avatar answered Sep 20 '22 19:09

KARTHIKEYAN.A


I was also facing this issue when we upgraded from java 8 to java 10. I solved by removing -Djava.endorsed.dirs="C:\Program Files\Apache Software Foundation\Tomcat 8.5\endorsed" from the argument.

like image 38
sadique urf arbaz Avatar answered Sep 20 '22 19:09

sadique urf arbaz