Eclipse: JVM terminated. Exit code=2

前端 未结 6 776
走了就别回头了
走了就别回头了 2020-11-29 06:38

I recently decided to start trying Android app development, so I downloaded the Java SE Development Kit 8 (x86) for Windows (I got Windows 8 64bit, but my guide recommends g

相关标签:
6条回答
  • 2020-11-29 07:06

    What worked for me was having installed adoptopenjdk11 using Chocolatey package manager:

    choco install adoptopenjdk11

    0 讨论(0)
  • 2020-11-29 07:15

    I had the same issue and was trying to install different versions of JDK: 1.6, 1.7, 1.8.

    It didn't help much.

    The problem was resolved when I changed PATH variable by removing

    C:\ProgramData\Oracle\Java\javapath;
    

    In command prompt I also ran following commands:

    set JAVA_HOME=C:\Program Files\Java\jdk1.8.0_25
    set PATH=C:\Program Files\Java\jdk1.8.0_25\bin;%PATH%
    

    But I think the most important was to remove C:\ProgramData\Oracle\Java\javapath; from the PATH.

    0 讨论(0)
  • 2020-11-29 07:15

    One line answer, remove 'C:\ProgramData\Oracle\Java\javapath;' from your path variable. It will start to work.

    0 讨论(0)
  • 2020-11-29 07:16

    Here is an alternative: As described here, make sure that you have the -vm option set in your eclipse.ini file. It must be an absolute path and on 2 separate lines:

    -vm
    <Absolute Path>\javaw.exe
    

    Save your .ini and relaunch Eclipse

    0 讨论(0)
  • 2020-11-29 07:16

    Most errors with starting eclipse happen due to multiple JRE or JDK version which makes the installer go nuts.

    Solution: Go to Control Panel -> Uninstall Programs

    If you're running 64-bit java, then uninstall all Java without the 64bit indicator. If 32-bit, then uninstall all that have 64-bit It works like magic!

    0 讨论(0)
  • 2020-11-29 07:23

    I know exactly how to solve your problem. Go to search and put in environment, a prompt will come up and ask you to "Edit environmental variables for your account" click that and a window will pop up. There will be the current paths which are running on the top (you should have your JDK version running, mine is 1.8) and on the bottom part there will be paths to choose from. Select (on the bottom part) the java path and delete it, then click okay. This should work.

    If it didn't work, You may also add a new path to the java bin folder which worked for me.

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