如何在Eclipse Window Builder中处理“运行0的不兼容Java版本"? [英] How to deal with 'Incompatible Java Versions running 0' in Eclipse Window Builder?

查看:389
本文介绍了如何在Eclipse Window Builder中处理“运行0的不兼容Java版本"?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在WindowsBuilder中安装了Eclipse,并且过去在显示JFrame的设计选项卡时效果很好.

我刚刚安装了Intellj,并且除了当前的SE-9 JVM外还安装了JDK.我的eclipse程序仍然可以运行,但是在我打开WindowsBuilder设计时显示以下内容:

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

必须为零,而不是1.8或9.

其他StackExchange答案表明我降级了Java版本,但是当我转到project/properties/java编译器时,它不起作用.

我的Java编译器链接到SE-9,所以我不确定为什么会发生此新错误.也许是由于还安装了JDK?

解决方案

这是在Window Builder中检测Java版本字符串的已知错误.从历史上看,对版本字符串的解析是为了不检查索引位置0(例如9.010.0)而是索引2(即1.61.7,...)的主要版本部分而执行的. >

很遗憾,到目前为止,在错误报告 517291 中,找到这个:

欢迎补丁,我们目前没有活跃的WB开发人员.

因此,某些人必须为导致您痛苦的这种不希望有的行为做出贡献.

因此,现在,如果要在Eclipse中使用Window Builder,则必须保留Java版本小于或等于 1.8 .作为参考,请通过 greg-449 解决方案

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

这篇关于如何在Eclipse Window Builder中处理“运行0的不兼容Java版本"?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆