java window 版本不兼容,如何在Eclipse Window Builder中处理“运行0的不兼容Java版本”?...

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

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值