Eclipse windowbuilder java 1.6 1.7

Kasper Sørensen picture Kasper Sørensen · Mar 2, 2013 · Viewed 9.4k times · Source

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

When I check the properties for the project, it is set to Java Compiler 1.7. When I run a Java -version in my terminal I get:

  java version "1.7.0_15"
  Java(TM) SE Runtime Environment (build 1.7.0_15-b03)
  Java HotSpot(TM) 64-Bit Server VM (build 23.7-b01, mixed mode)

I have tried to chance the path to the newest Java, following this link: Link to Eclipse Wiki

When changing it to:

-vm
/Library/Java/JavaVirtualMachines/jdk1.7.0_15.jdk/Contents/Home/bin/java

I get a error when I try to open Eclipse saying: "the jvm shared library does not contain the jni_createjavavm symbol"

What's where I am stuck. Anyone how knows how to fix this problem? I have tried using Netbeans, but my Mac and Netbeans are not best friends: Pic of screen-crash

Answer

niculare picture niculare · Mar 3, 2013

Go to Project Properties and change the project compliance level from 1.7 to 1.6. Also leave the Eclipse running under Java 1.6.