I just rebooted my computer without changing anything. Suddenly I can't open Eclipse. Instead, I get this error message:
┌──────────────────────────────────────────────────────────────────────┐ │ Eclipse │ ├──────────────────────────────────────────────────────────────────────┤ │ │ │ A Java Runtime Environment (JRE) or Java Development Kit (JDK) │ │ must be available in order to run Eclipse. No Java virtual machine │ │ was found after searching the following locations: │ │ C:\Users\emiri\Downloads\eclipse\jre\bin\javaw.exe │ │ javaw.exe in your current PATH │ │ │ │ ┌────────────┐ │ │ │ OK │ │ │ └────────────┘ │ └──────────────────────────────────────────────────────────────────────┘
And I see all my environment variables have been erased. java
, javac
, mvn
, etc. don't work. What do I do now, and how do I fix this?
Let eclipse use your java vm directly!
Put these lines at the end of eclipse.ini (located in the directory where eclipse.exe is present):
-vm <your path to jdk|jre>/bin/javaw.exe
Pay attention that there are two lines. Also make sure that the -vm option is before the -vmargs option (and of course after "openFile").
Useful link Eclispe.ini at wiki.eclipse.org
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With