A JRE or JDK must be available in order to run Eclipse. No JVM was found after searching the following locations

前端 未结 27 2094
渐次进展
渐次进展 2020-12-01 00:31

Eclipse is unable to open, have used eclipse before and has open before without a problem. Now I keep getting the following error message:

A Java Runt

相关标签:
27条回答
  • 2020-12-01 01:06

    Change the vm value in eclipse.ini file with the correct path to your JDK something like this,

    -vm /Library/Java/JavaVirtualMachines/jdk-11.0.5.jdk/Contents/Home/bin

    Path to eclipse.ini looks to me something like this,

    /Users/tomcat/eclipse/jee-2018-09/Eclipse.app/Contents/Eclipse

    0 讨论(0)
  • 2020-12-01 01:08

    If on Linux (ex: Ubuntu 18), try installing (or reinstalling in your case?) default-jre, as follows:

    sudo apt update
    sudo apt install default-jre
    

    I had the same error when just trying to run the Eclipse installer (./eclipse-inst) on a fresh Eclipse download just now, and the installer wouldn't even run! Installing default-jre solved it!

    Source:

    • https://linux4one.com/how-to-install-eclipse-ide-on-ubuntu-18-04/
    0 讨论(0)
  • 2020-12-01 01:12

    You can explicitly tell Eclipse where to find it. Open eclipse.ini and add the following lines to the top of the file:

    -vm
    /absolute/path/to/jre6/bin
    

    Update: I just nailed down the root cause on my own Windows machine. The GlassFish installer complained with exactly the same error message and after digging in GlassFish forums, the cause was clear: a corrupt JRE install on a Windows machine. My JRE came along with the JDK and the Java 6 JDK installer didn't install the JRE properly somehow. A DLL file was missing in JDK's JRE installation. After I reinstalled the standalone JRE from http://java.com, overwriting the old one, the GlassFish installer continued and also Eclipse was able to start flawlessly without those two lines in eclipse.ini.

    0 讨论(0)
  • 2020-12-01 01:13

    I got this problem because i uninstalled the jdk version 13 and reinstall the jdk version 8

    Even though i have updated the path variables eclipse still pick the old configuration.

    You need to edit the eclipse.ini file which is in your folder where eclipse.exe is placed.

    Just update this file with the latest path so eclipse can pick it up

    0 讨论(0)
  • 2020-12-01 01:14

    Newb move on my part, but I had installed just the JRE instead of JDK. Installed JDK and my problem went immediately away.

    0 讨论(0)
  • 2020-12-01 01:17

    It usually is because:

    • you indicated the wrong jvm path in your -vm argument: see this SO question for an concrete example.
    • the eclipse.ini got corrupted somehow (if it hasn't been modified, this isn't it, but if setting a jvm path doesn't work, ... I would replace the eclipse.ini by one coming from a fresh installation just to be sure)
    • the java which eclipse search by default is no longer accessible (because the $PATH is no longer up-to-date)

    More details on the wiki page "Finding a VM, Using JNI Invocation or Executing Java"

    No -vm specified

    When no -vm is specified, the launcher looks for a virtual machine first in a jre directory in the root of eclipse and then on the search path.
    If java is found in either location, then we look for a jvm shared library (jvm.dll on window, libjvm.so on *nix platforms) relative to that java executable.

    • If a jvm shared library is found we load it and use the JNI invocation api to start the vm.
    • If no jvm shared library is found, we exec the java launcher to start the vm in a new process.

    As mentioned in "FAQ How do I run Eclipse?":

    Eclipse DOES NOT consult the JAVA_HOME environment variable.

    So I would check your $PATH, starting by n new shell sesion (whatever your OS is), typing 'java -version' to see if it still returns anything.

    0 讨论(0)
提交回复
热议问题