Coisox
Coisox

Reputation: 1104

Eclipse cannot start after upgrading from JRE to JDK

My "Eclipse JEE Neon 2 64bit" can't be launch (got splash screen is a split second) just now. Not sure these thing that I did last week is the cause:

  1. I want to build android apps. So I uninstall JRE 131 then install JDK 131 which automatically install JRE 131
  2. I add ANDROID_HOME and JAVA_HOME (C:\Program Files\Java\jdk1.8.0_131) to system variables
  3. I add %JAVA_HOME%\bin in the path of system variables
  4. Then I successfully build my cordova apps using notepad++ (Not eclipse)
  5. After the above thing, I didn't open my Eclipse. But just now (1 week after the above thing) when I try to open Eclipse for another project, I got this problem.

Then I download JDK 32bit of the same version. Currently my machine has both 32 and 64 bit. But still cannot launch Eclipse.

Then I did the following:

  1. Edit eclipse.ini, add

    -vm
    C:\Program Files\Java\jre1.8.0_131\bin
    
  2. Still cannot start Eclipse, I change to

    -vm
    C:\Program Files\Java\jre1.8.0_131\bin\javaw.exe
    
  3. Still cannot start Eclipse, I change to

    -vm
    C:\Program Files (x86)\Java\jre1.8.0_131\bin
    
  4. Still cannot start Eclipse, I change to

    -vm
    C:\Program Files (x86)\Java\jre1.8.0_131\bin\javaw.exe
    
  5. Still cannot start Eclipse, I reset eclipse.ini to default and remove all 3 system variables setting (ANDROID_HOME, JAVA_HOME, Path)

Upvotes: 2

Views: 630

Answers (2)

Coisox
Coisox

Reputation: 1104

Thank you guys for helping. I was able to solve. Actually I didn't know 2 things:

  1. -vm should be put before vmargs
  2. I should point to JDK not JRE

Not working:

-vmargs
-Dosgi.requiredJavaVersion=1.8
-XX:+UseG1GC
-XX:+UseStringDeduplication
-Dosgi.requiredJavaVersion=1.8
-Xms512m
-Xmx2048m
-vm
C:\Program Files\Java\jdk1.8.0_131\bin\javaw.exe

Working:

-vm
C:\Program Files\Java\jdk1.8.0_131\bin\javaw.exe
-vmargs
-Dosgi.requiredJavaVersion=1.8
-XX:+UseG1GC
-XX:+UseStringDeduplication
-Dosgi.requiredJavaVersion=1.8
-Xms512m
-Xmx2048m

But I'm still wondering, why before I install JDK, my Eclipse can work on JRE.

Upvotes: 1

ugo
ugo

Reputation: 284

Running a 64bit Eclipse, you need a 64bit jre/jdk.

Upvotes: 1

Related Questions