简体   繁体   中英

How to deal with 'Incompatible Java Versions running 0' in Eclipse Window Builder?

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?

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, eg 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).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM