0

I try to use Intellij IDEA for Greenfoot development on Mac. Here is a tutorial to use NetBeans with Greenfoot: https://www.greenfoot.org/doc/running_on_netbeans

So I created my scenario in Greenfoot. Then saved it and opened it in IDEA. I took greenfoot.jar and bluejcore.jar from application package and added these libraries to a project structure. At this point I receive the following error:

Error:(9, 30) java: cannot access greenfoot.World bad class file: /Users/.../Greenfoot/greenfoot.jar!/greenfoot/World.class class file has wrong version 55.0, should be 52.0 Please remove or make sure it appears in the correct subdirectory of the classpath.

Some conflict with a version. However I took both jars from the Greenfoot application installed on my machine. Appreciate some help.

Kirill Ch
  • 5,496
  • 4
  • 44
  • 65

1 Answers1

2

The error says, that greenfoot.World was compiled with Java 11 and you try to use it with a compiler supporting up to Java 8.

Try changing the JDK

JCWasmx86
  • 3,473
  • 2
  • 11
  • 29