4

I have Eclipse installed with WindowsBuilder, and it has worked fine in the past in showing the design tab of JFrame.

I just installed Intellj, and installed a JDK in addition to my current SE-9 JVM. My eclipse program is still functional , but is showing the following when I open WindowsBuilder design:

Incompatible Java versions: Eclipse is running under 0, but this Java project has a 
9 Java compliance level, so WindowBuilder will not be able to load classes from this 
project. Use a lower level of Java for the project, or run Eclipse 
using a newer Java version

There must be something to the zero, rather than 1.8 or 9.

Other StackExchange answers suggest that I downgrade my Java version, but when I went to project/properties/java compiler, it did not work.

My java compiler is linked to SE-9, so I am unsure why this new error is occurring. Maybe it is due to installing the JDK as well?

MWiesner
  • 8,868
  • 11
  • 36
  • 70
G Thorburn
  • 41
  • 3
  • What about your eclipse.ini file? Have you redefined the Java version which should be used with Eclipse? Also, is it possible that the new JDK you installed had overwritten a previously existing JDK directory? – Rann Lifshitz May 05 '18 at 16:03
  • @RannLifshitz my buildpath is still linked to SE-9, would you be able to specify how I can check my eclipse.ini to check? I don't think it has overriden the previous directory – G Thorburn May 05 '18 at 16:27
  • In Eclipse preferences which is the default JRE? – Jonathan Rosenne May 05 '18 at 16:30
  • https://wiki.eclipse.org/Eclipse.ini – Rann Lifshitz May 05 '18 at 16:36
  • It was an issue with default JRE. While downloading Intellj and downloading version 10, it did not properly update within Eclipse. I solved it by uninstalling the version 10 SE and JDK, and properly updating. Thank you. – G Thorburn May 05 '18 at 17:51

1 Answers1

6

It's a known bug with the detection of Java version strings in Window Builder. Historically, the parsing of version strings was implemented to not check for the major version part at index position 0, e.g 9.0 or 10.0, but at index 2, namely 1.6, 1.7,...

Sadly, as of today, in the bug report 517291 we find this:

Patches welcome, we currently do not have active WB developers.

so somebody has to contribute a fix for this undesired behaviour that causes you pain.

So for now, you have to stay with Java versions less or equal to 1.8 if you want to use Window Builder in Eclipse. For reference, see this answer by greg-449 or this answer on this topic.

Hope this helps (for now).

MWiesner
  • 8,868
  • 11
  • 36
  • 70