Error: "Could not create the Java virtual machine" when launching an app
The Java Virtual Machine uses the -Xmx switch to define the maximum size of the JVM's heap memory. If you are seeing this error message it is likely that the -Xmx switch in the eclipse.ini file is set too high for the current environment.
Resolving the problem
There are two possible solutions for this issue.
Remove the line in the eclipse.ini file that starts -Xmx
Note: eclipse.ini is located in your eclipse install folder.
or
Reduce the value of the -Xmx switch
For this example
-Xmx1024m
becomes
-Xmx928m
Only lower the value just far enough to allow the tool to launch, as the lower this value is, the less memory RSA is allowed to use. You may run into performance problems if the value is too low.
Note, in your server run configurations, there are optional arguments you can pass, and -Xmx is often in there for whatever reason. You should remove those, or sync them all up.
References
[Click to add or edit comments])
Please prepend comments below including a date