Can't run Eclipse with Java 10.0.1

Instructions

(ignore that the images don't show Java 10 but Java 9 and 8 instead)

First step is that you need to download a JDK 10 (download). Then set your Windows Path system environment variable to point to the bin directory of your JDK 10 and remove the entry to the old java version (see the tutorial). Looks like this on my end:

path variable

This variable defines where Windows will look for commands. Try it out by typing in java -version into your cmd:

command line

If it reads Java 10 it worked.

After that you need to set your Eclipse to Java 10. Therefore, first add the JDK as possible JRE for Eclipse. Go to Window > Preferences > Java > Installed JREs and add it:

eclipse jres

Last step is that you need to tell your project to use this entry now. Go to Properties > Java Build Path of your project and edit the JRE it uses:

project jre


Eclipse and Java 10

Note that Eclipse does not really support Java 10 yet.

Oxygen has an early draft that supports it, but it may be difficult to get all plugins going. See here.

Photon will support it when released in June. The early build of Photon doesn't support it yet. See here.


I was able to resolve this issue by updating Eclipse through their installer tool.

First of all, try updating the config of your current installation. It's called eclipse.ini and it's going to be in the original installation directory. Mine looks somewhat like this:

[...]
openFile
--launcher.appendVmargs
-vm
C:\Program Files\Java\jre-10.0.1\bin  <--Change this to the correct JRE path
-vmargs
-Dosgi.requiredJavaVersion=1.8
[...]

If that doesn't work, try:

  1. Install JRE 10. Look at the first part of Zabuza's answer for instructions.
  2. Download the Eclipse Installer (http://eclipse.mirror.rafal.ca/oomph/epp/oxygen/R2/eclipse-inst-win64.exe)
  3. Update the installer if it requires one. There will be a notification when you launch it; click it and the installer will update and restart.

In the next window: enter image description here

  1. Choose a product from the list. I chose one that I already had installed.
  2. Change the Eclipse version if you'd like. I stuck with Oxygen.
  3. Browse to where you installed your jre 10 version and click next.

In the next window: enter image description here

  1. Check a project to download if you want. I didn't download any of them. Click next.
  2. Continue through the installation and specify your preference for it's location. I chose to install in the same location. This should not touch any of your project files.
  3. Choose a location for the workspace. I chose the original location.
  4. Eclipse should open with the welcome page. Click File > Open Project from File System, and it will import your project.

  5. You may have to repeat the part at the top and edit the eclipse.ini of at lease check that it is still updated.