Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't run Eclipse with Java 10.0.1

I have updated my Java to version 10.0.1 and now I can't run Eclipse anymore.

It shows this message:

a java runtime environment (JRE) or Java development Kit(jdk) must be available in order to run eclipse. No Java virtual machine was found after searching the following locations:

C:\Program Files\Java\ire1.8.0_144\bin

I tried from advance settings to insert a new path but doesn't work.

like image 909
Stavros Argyrides Avatar asked Apr 30 '18 22:04

Stavros Argyrides


People also ask

Does Eclipse Need Java 11?

Current releases of Eclipse require Java 11 JRE/JDK or newer. A Java Development Kit (JDK) includes many useful extras for Java developers including the source code for the standard Java libraries. Regardless of your operating system, you will need to install some Java virtual machine (JVM).

What version of Eclipse works with Java 11?

I am pleased to announce Java 11 support for Eclipse 2018-09 (4.9). The release notably includes the following Java 11 features: Nest-Based Access Control (JEP 181) Basic support for Dynamic Class-File Constants (JEP 309)

How do I enable Java 11 in Eclipse?

A Java 11 JRE is recognized by Eclipse for launching. It can be added from the Window > Preferences > Java > Installed JREs > Add... page. It can also be added from the Package Explorer using the project's context menu.


1 Answers

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.

like image 73
Zabuzard Avatar answered Oct 16 '22 06:10

Zabuzard