4

I Installed WindowBuilder on Eclipse to create a Graphic User Interface for a program. When I go to the 'Design' tab the following error appears:

Eclipse is running under 1.8, but this Java project has a 10 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.

I currently have Installed Java 8 (Update 171), and Oxygen.3a (4.7.3a) (Eclipse Version). I had previously downloaded Java 10, but I read that there's a bug where WindowBuilder doesn't work on that version, and that it is recommened the Version 8, which is the one I downloaded and installed (after uninstalling Version 10). But the problem's still there.

What could I do to solve this? Thank you.

Dani
  • 43
  • 1
  • 1
  • 5
  • Can't you develop your project in Java 8? Your code should still compile in Java 10 with, at most, minor changes (unless you're depending on or doing some fancy stuff) – ifly6 Jul 18 '18 at 17:56
  • @ifly6 Yes of course I can, the problem here is that WindowBuider doesn't work. I don't know how to solve that problem :( I don't care about the version, the thing here is that the plugin doesn't work – Dani Jul 18 '18 at 18:02
  • "this Java project has a 10 Java compliance level" points to changing that value from the project's Properties dialog. – nitind Jul 18 '18 at 18:03

3 Answers3

6

Just change the compliance level of the project from 10 to 1.8, rebuild and the Design tab should work:

  1. To change the project's compliance level:

    • Select the project's node in Project Explorer, right-click and select Properties.
    • Select Java Compiler from the column on the left.
    • Uncheck Use Compliance from execution environment...
    • Select 1.8 from the drop list for Compiler compliance level. (Presumably its current value is 10.)
    • Click the Apply and Close button.
  2. Rebuild the project using 1.8 compliance.
  3. The Design tab should work fine now.

complianceLevel

As a separate issue, since you have uninstalled Java 10 you should also remove it from your Installed JREs if you haven't done that already:

  • Windows > Preferences > Java > Installed JREs
  • Select the entry for JDK 10 and click the Remove button.
  • If the JDK 10 entry was checked when you removed it you will be forced to check another JRE definition.
  • Click the Apply and Close button.
skomisa
  • 16,436
  • 7
  • 61
  • 102
  • I did another project, added the windowbuilder application and now It works perfectly! Thank you so much. Thumbs up. – Dani Jul 19 '18 at 17:03
  • i did not have to uninstall any jre. All I did was to follow the first steps you listed for changing project compliance. thanks – CanCoder Sep 10 '19 at 16:09
  • @leeCoder You are right; uninstalling Java 10 is certainly not necessary to get everything working. But the OP mentioned that they had (unnecessarily) chosen to uninstall 10, so I just pointed out in my answer that it should also be removed from within Eclipse to complete the clean up process. – skomisa Sep 10 '19 at 17:29
2

WB 1.9.1 has solved the issue:

https://www.eclipse.org/windowbuilder/download.php

Yaza
  • 543
  • 3
  • 9
-1

Just change the compliance level of the project from the current to 1.8, rebuild and the Design tab should work: It works for me

Badjam
  • 1
  • How does this add anything to the [answer posted by skomisa](https://stackoverflow.com/a/51414146/10871073) some time ago? – Adrian Mole Feb 14 '21 at 11:36