Issue
When i try to start Eclipse (on Windows) i get this error, out of nowhere:
Could not create the Java Virtual Machine
And:
Java was started but returned exit code = 1
href="https://i.stack.imgur.com/nwzsv.png" rel="nofollow noreferrer">
My attempts to solve the problem:
- Editing the eclipse.ini with
-Xms3072M -Xmx6144M XX:PermSize=512m -XX:MaxPermSize=1024m
(and other combinations). - Adding a path before -vmargs, such as
-vm “c:\Program Files\Java\jdk1.7.0_07\bin\javaw.exe”
- Changing
-Dosgi.requiredJavaVersion=1.6
with 1.7 (i have multiple jdk and jre, in Program Files/Java and Program Files(x86)/Java). - Deleting eclipse.ini.
- Adding the following system environment variables: _JAVA_OPTION (-Xmx512M), JAVA_HOME. And editing Path with a path from my jdk7.
- Restarting the system at every step.
Solution
As suggested in the comment section, installing a new version of Eclipse (Photon, 2022-06 or more) solved the problem.
Answered By - Antonino Scarpelli
Answer Checked By - Mildred Charles (JavaFixing Admin)