[英]Eclipse Eclipse is running under 1.6, but 1.7 is needed
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." 我刚刚安装了适用于Eclipse和Java 1.7 JDK的WindowBuilder,但是当我在Eclipse中创建新的JFrame并尝试在WindowBuilder中打开“设计视图”时,出现以下错误:“ Eclipse在1.6下运行,但是Java该项目的Java符合性级别为1.7,因此WindowBuilder将无法从该项目中加载类。对该项目使用较低级别的Java,或使用较新的Java版本运行Eclipse。” How to Resolve Incompatible Java version Error in Eclipse in mac?
如何解决Mac中Eclipse中不兼容的Java版本错误?
You might have installed the Java 1.7 SDK but it looks like Eclipse is started with the older one (1.6). 您可能已经安装了Java 1.7 SDK,但看起来Eclipse是从较早的版本(1.6)开始的。 The WindowBuilder is integrated into Eclipse and will use the same Java instance as Eclipse (that is the 1.6 version).
WindowBuilder已集成到Eclipse中,并将使用与Eclipse相同的Java实例(1.6版)。
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). 但是,您的项目将使用Java7。WindowBuilder(Java 6)将无法从项目使用的更高版本(Java 7)加载类。
What you need to do is: Configure your eclipse to start with the newer (Java 7) version. 您需要做的是:将Eclipse配置为从较新的(Java 7)版本开始。 This can be done in the Eclipse.ini file.
这可以在Eclipse.ini文件中完成。
Which Eclipse you're running? 您正在运行哪个Eclipse? You definitely need to upgrade your Eclipse to a newer x64 Version to use Java 1.7.0
您肯定需要将Eclipse升级到更新的x64版本才能使用Java 1.7.0。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.