首页 > 解决方案 > Eclipse 氧气 4.7.3a 上的 Java swing?

问题描述

我正在尝试在 macOS highSierra 上的 Eclipse 氧气 4.7.3a 上使用 windowbuilder。它安装得很好但每次我尝试打开设计部分时都会显示此错误

Eclipse 在 0 下运行,但这个 Java 项目有 1.8 Java 合规级别,因此 WindowBuilder 将无法从这个项目加载类。为项目使用较低级别的 Java,或使用更新的 Java 版本运行 Eclipse。

我什么都试过了。比如改变运行环境,.jre 文件,尝试不同的 JDE。没有任何工作。有什么建议么?

标签: javaeclipseswingwindowbuilder

解决方案


Uninstall Java Version and Install lower version of Java(8).Support for WindowBuilder is not provided anymore.

How to uninstall current version?(Mac)

Go to /Library/Java/JavaVirtualMachines/ to see current version of java and replace jdk1.8.0_131.jdk with yours.

  1. sudo rm -rf /Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk
  2. sudo rm -rf /Library/PreferencePanes/JavaControlPanel.prefPane
  3. sudo rm -rf /Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin
  4. sudo rm -rf ~/Library/Application\ Support/Oracle/Java

Install Java 8:

https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html

Then: Right click on your project and go to Properties enter image description here

Make sure your configuration look like this, At the top of picture Configure Workspace settings click on it (Uncheck project specification settings) and then see image below Figure1

Apply same as in picture Then enable "project specification settings"

Restart Your Eclipse

Done!!


推荐阅读