Eclipse Eclipse运行在1.6以下,但需要1.7 [英] Eclipse Eclipse is running under 1.6, but 1.7 is needed

查看:293
本文介绍了Eclipse Eclipse运行在1.6以下,但需要1.7的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚安装了WindowBuilder for Eclipse和java 1.7 JDK,但是当我在Eclipse中创建一个新的JFrame,并且尝试在WindowBuilder中打开设计视图时会得到以下错误:Eclipse运行在1.6以下,但是Java项目的Java兼容级别为1.7,因此WindowBuilder将无法从项目中加载类。对于项目使用较低级别的Java,或者使用较新的Java版本运行Eclipse。
如何解决Java中的不兼容Java版本在Mac中的错误?

解决方案

您可能已经安装了Java 1.7 SDK Eclipse看起来像旧版本一样(1.6)。
WindowBuilder集成到Eclipse中,并将使用与Eclipse(即1.6版本)相同的Java实例。



但是,您的项目将使用Java 7。 WindowBuilder(Java 6)将无法从您的项目使用的较高版本加载类(Java 7)。



您需要做的是:
配置您的eclipse从较新的(Java 7)版本开始。这可以在 Eclipse.ini 文件中完成。


I have just installed WindowBuilder for Eclipse and java 1.7 JDK, but when I create a new JFrame in Eclipse, and try to open the "design-view" in WindowBuilder I get the following error: "Eclipse is running under 1.6, but the Java project has a 1.7 Java compliance level, so WindowBuilder will not be able to load classes from the project. Use a lower level of Java for the project, or run Eclipse using a newer Java version." How to Resolve Incompatible Java version Error in Eclipse in mac?

解决方案

You might have installed the Java 1.7 SDK but it looks like Eclipse is started with the older one (1.6). The WindowBuilder is integrated into Eclipse and will use the same Java instance as Eclipse (that is the 1.6 version).

However your project will use Java 7. The WindowBuilder (Java 6) will be unable to load classes from the higher version which your project uses (Java 7).

What you need to do is: Configure your eclipse to start with the newer (Java 7) version. This can be done in the Eclipse.ini file.

这篇关于Eclipse Eclipse运行在1.6以下,但需要1.7的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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