Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » Eclipse compatibility with Java updates
Eclipse compatibility with Java updates [message #1784601] Fri, 30 March 2018 04:05 Go to next message
Bruce Kelly is currently offline Bruce KellyFriend
Messages: 5
Registered: October 2014
Junior Member
A few days ago I installed Java 10 and Eclipse 4.7.3.
I was not wanting to use any features of Java 10, just Java 9.
I used the -clean option when I started Eclipse and everything seemed fine.

I continued with my development and executed the program I was working on using both the "Run as" popup menu option and the "Run" button.

Today I was working on a different program in the same workspace but the drop down menu for the "Run" button didn't include the configuration for the program I wanted to run. So I opened the "Run Configurations" dialog.

This was when I discovered that I could not use it to run any program as it was reporting "JRE not compatible with workspace .class file compatibility: 9". The "Run" button on the dialog remained greyed out.

Opening the "Execution Environments" tab in preferences shows absolutely no compatible JREs for any environment. So Eclipse must think that a standard JDK 10 install is not compatible with anything.

Back to the Run Configurations dialog. Selecting the JRE tab and the "Execution Environment" option enables the combo box. However all but JavaSE-1.8 are unbound and the JavaSE-1.8 environment is bound to the installed JRE!

So Eclipse thinks that the standard JDK 10 is not compatible with any execution environment, but also that it is compatible with JavaSE-1.8.

I expected there to be no problems using Java 10 whilst working on Java 9 code.
(Given the major upheaval in Eclipse due to Java 9 maybe I should have.)
Should I have expected a compatibility issue like this with the upgrade to Java 10?
Should I also expect issues like this with future upgrades?

I think the inconsistent behaviour of Eclipse may not be worth fixing/reporting as I can still execute programs.

Namaste, Bruce
Re: Eclipse compatibility with Java updates [message #1784602 is a reply to message #1784601] Fri, 30 March 2018 04:43 Go to previous messageGo to next message
Sarika Sinha is currently offline Sarika SinhaFriend
Messages: 131
Registered: February 2010
Location: Bangalore, India
Senior Member
Hi,
This looks like an old issue resolved by Bug 526764 https://bugs.eclipse.org/bugs/show_bug.cgi?id=526764.

Can you try out the RC1 build for 4.7.3a with Java 10 support.
http://download.eclipse.org/eclipse/downloads/drops4/M-4.7.3aRC1-201803231030/




Sarika Sinha
JDT Programmer
Re: Eclipse compatibility with Java updates [message #1784628 is a reply to message #1784602] Fri, 30 March 2018 21:53 Go to previous messageGo to next message
Bruce Kelly is currently offline Bruce KellyFriend
Messages: 5
Registered: October 2014
Junior Member
I was aware of this build and I could try it if I had the time. I prefer to wait for the official 4.7.3 release.

However my question was more generally about future Java upgrades (every 6 months).

Looking at the bug report it appears that a lot of work went into resolving the ongoing issue.
My feeling, as a Java developer using Eclipse as my IDE, is that the work was unnecessary as letting the JVM make the decision is much simpler and will always work; irrespective of which JVM is used.
The situation of using Eclipse based applications may be a little different, but even then it is the developers creating the application who would encounter any problems before the app is released.
Changes to the JVM after the app is installed may need to be handled, but it has always been possible to ship the JRE with the app, which would avoid any potential problems.

Namaste, Bruce
Re: Eclipse compatibility with Java updates [message #1784639 is a reply to message #1784628] Sat, 31 March 2018 14:16 Go to previous messageGo to next message
Stephan Herrmann is currently offline Stephan HerrmannFriend
Messages: 1853
Registered: July 2009
Senior Member
Regarding the specific timing of your question: we have finalized Java 10 support for the 4.7.3a release (scheduled to go public on Apr. 11) just now. Until that release a few rough edges are not only to be expected, but Eclipse lives from the feedback of its users during development. In this regard you are more than welcome to report issues with unreleased features directly into bugzilla (well, looking for existing reports of the same issue is of course highly appreciated :) ).

As for predicting future Java versions, you may recall that Java 10 was originally announced as "18.3", only later renamed to "10". Since we never knew how to detect compatibility of future versions, JDT has a tradition of waiting until a new version is (about to be) released, before we recognize it as compatible. It is a valid point - already being discussed - whether from now on recognizing Java versions should apply the announced scheme of future Java versions, rather then relying on a fixed set of known versions.

I'm not 100% sure what you mean by "letting the JVM make the decision". There is no way of asking a JVM "are you compatible with Java 9" or such. Moreover, JDT needs to be able to read .class files. If we are presented with a class file from a version that JDT does not understand, there can be no guarantee that the tooling will "just work". In some cases it can't.

As you mention Java 9 in particular, maybe we should even raise a much stronger warning when working on Java 8 projects using JDK 9, because chances are that the Java 8 program will *not* run out-of-the-box on JDK 9 ;-p

cheers,
Stephan
Re: Eclipse compatibility with Java updates [message #1784688 is a reply to message #1784639] Mon, 02 April 2018 12:27 Go to previous message
Stephan Herrmann is currently offline Stephan HerrmannFriend
Messages: 1853
Registered: July 2009
Senior Member
Here's the RFE to follow: https://bugs.eclipse.org/531843
Previous Topic:Eclipse JDT Oxygen 2 Crashes
Next Topic:Eclipse or Oracle Java compiler disagreement
Goto Forum:
  


Current Time: Tue Apr 23 11:51:59 GMT 2024

Powered by FUDForum. Page generated in 0.04521 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top