AdSense

網頁

2019/5/16

Eclipse cannot open on Windows

If you cannot launch your Eclipse program on your Windows system, the possible reasons are:

The Eclipse bit version is not compatible with your Windows bit version. For example, your Windows is 64-bit version, however, the Eclipse you downloaded is for 32-bit Windows.

You don't install JDK (Java Development Kit) on your Windows. Eclipse runs on JVM (Java Virtual Machine), so you have to install JDK on your Windows first.

JDK version is not supported. If the Eclipse you installed requires newer version JDK, like JDK 8, and your JDK version is old, like JDK 7 or lower.

System Environment Variables PATH config incorrectly. PATH variable need reference to JAVA_HOME, like C:\Program Files\Java\jdk1.8.0_201\bin, or Eclipse doesn't know JVM location.

Sometimes Eclipse can be opened normally today, but suddenly it cannot be opened tomorrow. This may be caused by Java Auto Update, so the origin JAVA_HOME path is moved to the rear in PATH. so the Eclipse will use the first found javaw.exe in PATH

The best way to solve this issue is to modify eclipse.ini, by adding the correct JDK path, Eclipse will always find the right javaw.exe to run.

The eclipse.ini is in Eclipse installed directory.

Use Notepad++ to edit eclipse.ini (There will be no line break if you use Windows Notepad to open).

Add new parameters -vm in above of -vmargs, and the value is JAVA_HOME path.

For example, I've installed jdk1.8.0_60 on my Windows 64-bit, so the JAVA_HOME is C:\Program Files\Java\jdk1.8.0_60\bin\

-vm
C:\Program Files\Java\jdk1.8.0_60\bin\javaw.exe  /* your JAVA_HOME path */

Every time Eclipse started, it checks eclipse.ini to initialize setting, so after adding above parameter, Eclipse will always use javaw.exe in the JAVA_HOME in eclipse.ini. Please refer to here and here.

沒有留言:

AdSense