23

I just installed the OpenJDK version of the JDK 11 General-Availability Release on Windows 10. I tried to install it as a JRE in the just-released Eclipse 2018-09 (4.9.0), and a message appared in the Eclipse dialog saying:

You selected a JRE that this version of Eclipse JDT does not yet support fully. Some of the features may not work as expected.

What is the problem?

  • Does Eclipse 2018-09 not fully support JDK 11?
  • Or is it that Eclipse doesn't fully support OpenJDK 11 but supports the Oracle JDK 11?
  • What "features" specifically can I expect to "not work as expected"?

Update: From an Internet search, I found some code that seems to indicate that Eclipse has an internal list of known Java versions, and it gives the above message if the new JDK version has a higher version than the known Java versions. (That's how I interpret the code.) Really? Eclipse launched a new 2018-09 version, just days before JDK 11 was released, without updating its list of known Java versions to include Java 11??

Maybe someone has a more authoritative answer.

greg-449
  • 109,219
  • 232
  • 102
  • 145
Garret Wilson
  • 18,219
  • 30
  • 144
  • 272
  • 2
    The is an update site `http://download.eclipse.org/eclipse/updates/4.9-P-builds` with Beta patches for Java 11 support. – greg-449 Sep 26 '18 at 15:01
  • 1
    From the message it's unclear if I can expect Eclipse to break, or if it simply won't won't have extra niceties such as a cool highlighting of `var` in the editor or something like that. – Garret Wilson Sep 26 '18 at 15:21
  • 3
    There is now Eclipse 2018-12 with full support of java 11. You can see what's new here : https://www.eclipse.org/eclipse/news/4.10/jdt.php – Fabich Jan 09 '19 at 15:20

2 Answers2

15

Eclipse 2018-09 doesn't support JDK 11 out of the box, but the official plugin for JDK 11 has now been released on the market place:

https://marketplace.eclipse.org/content/java-11-support-eclipse-2018-09-49

Here is the release announcement: https://www.eclipse.org/lists/jdt-dev/msg01049.html

OracleJDK and OpenJDK are supported in the same way (Other JDKs like OpenJ9 should work, too)

If a new JDK release is not supported, you cannot use its new language features and you may not be able to use it all for development because of class format changes. Launching is likely to work.

Till Brychcy
  • 2,876
  • 1
  • 18
  • 28
  • 3
    Wow, this is unexpected. I thought it would simply not support certain Java 11 features, but it turns out it won't even compile Java 8 code marked as Java 11 (https://stackoverflow.com/q/52539867/421049, https://bugs.eclipse.org/bugs/show_bug.cgi?id=539570) and with the Java 11 plugin you mentioned it goes into an endless loop of internal build errors (https://stackoverflow.com/q/52540355/421049, https://bugs.eclipse.org/bugs/show_bug.cgi?id=539536). It seems completely broken to me. – Garret Wilson Sep 27 '18 at 15:45
  • 3
    As background: Eclipse doesn't use javac, it has its own compiler. Also this bug is unfortunate, but this is exactly why new language support doesn't directly go into the closest normal Eclipse release (which gets way more testing) – Till Brychcy Sep 28 '18 at 06:48
  • 1
    With the plugin installed Eclipse complains that no compatible JRE is available for JavaSE-11, although Eclipse is running on java-11-openjdk *and* it is added to "Installed JREs". Anything else you've done to make that work? – svenmeier Dec 04 '18 at 16:38
  • 2
    OpenJDK 11 does not include a JRE. I had to download and install the JRE as well. I dropped it into a "jre" directory beneath JAVA_HOME – TikiTavi Jan 24 '19 at 19:08
  • 2
    This link is a bad link and yields a 404 not found: https://marketplace.eclipse.org/content/java-11-support-eclipse-2018-09-49 – atom88 Jun 28 '19 at 17:27
  • for the Eclipse 2018-09 update site JDK 11 support the link is: http://download.eclipse.org/eclipse/updates/4.9-P-builds/P20180926-0920/ – atom88 Jun 28 '19 at 17:29
-1

The update site for the plugin for 2018-09 is here: http://download.eclipse.org/eclipse/updates/4.9-P-builds/P20180926-0920/

atom88
  • 1,449
  • 3
  • 22
  • 32
  • 1
    Does anyone know how to switch the maven builder in eclispe from Java 1.8 to Java 1.11? I can do it on individual maven "run targets" in eclispe, but I want the "auto compile" feature of Eclispe and the maven built-in plugin to use Java 11 instead of Java 8 – atom88 Jun 28 '19 at 18:50