'"Error: Could not create the Java Virtual Machine Error: A fatal exception..." Shows error when I tried to launch Eclipse IDE 2019-06
The problem I am facing:
I have tried to launch the Eclipse IDE 2019-06 64-bit, but it is showing the error "Error: Could not create the Java Virtual Machine Error: A fatal exception has occurred. Program will exit."
Image of the error box:

Once I clicked on the Ok button the tab with some text starting with "java was started but returned exit code 1" shows up.
Image here:

(Sorry, It is not allowing to copy the whole text, so not able to paste it here.)
Things I have tried:
After searching in Google I got the blog which says in method 1 "add _JAVA_OPTIONS to System Variables and set the value to -Xmx512M", and in method 2 "run java.exe as an administrator" but both methods are not working.
Saw one video which says edit the 'eclipse.ini' and replace '-Xmx1024m' to '-Xmx512m', but it is not working though.
Currently, the 'eclipse.ini' file contains,
-startup
plugins/org.eclipse.equinox.launcher_1.5.400.v20190515-0925.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.1000.v20190125-2016
-product
org.eclipse.epp.package.jee.product
-showsplash
org.eclipse.epp.package.common
--launcher.defaultAction
openFile
--launcher.defaultAction
openFile
--launcher.appendVmargs
-vmargs
-Dosgi.requiredJavaVersion=1.8
[email protected]/eclipse-workspace
-XX:+UseG1GC
-XX:+UseStringDeduplication
--add-modules=ALL-SYSTEM
-Dosgi.requiredJavaVersion=1.8
-Dosgi.dataAreaRequiresExplicitInit=true
-Xms256m
-Xmx1024m
--add-modules=ALL-SYSTEM
Please note:
I have another version of the eclipse on my machine, which is 'Eclipse Juno'(Version: Juno Service Release 2 Build id: 20130225-0426) and it is working fine. But I want to upgrade that's why I am trying it.
OS I use: Windows 10 PRO 64-bit.
'java -version' gives:
java version "1.8.0"
Java(TM) SE Runtime Environment (build 1.8.0-b132)
Java HotSpot(TM) 64-Bit Server VM (build 25.0-b70, mixed mode)
Thanks in advance if you have the solution. If you don't have it, but understood the things which produce the error, please let me know by commenting the same. Thank you!
Solution 1:[1]
Try to uninstall and reinstall eclipse and Java... It's the first option that you must try with this type of "unexplained" errors.
Solution 2:[2]
- Create a Shortcut to the
eclipse.exe - Edit the shortcut so that it has
-vm {path to javaw.exe}as arguments - Make sure the shortcut
has the directory containing
eclipse.exeas its working/starting directory.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Marco De Simone |
| Solution 2 | nitind |
