Markus Pscheidt
Markus Pscheidt

Reputation: 7341

Buildship: Unsupported class file major version 60

After upgrading to Eclipse/Spring Tool Suite 4.11.0, Gradle refresh on a Java 15 project fails to work and reports the error Unsupported class file major version 60 (= Java 16), even though Java 15 is set up in Preferences -> Java -> Installed JREs.

Gradle Buildship is installed as Eclipse plugin.

Upvotes: 0

Views: 1453

Answers (1)

Markus Pscheidt
Markus Pscheidt

Reputation: 7341

Solution is to explicitly set the Java version in Gradle preferences.

enter image description here

Additional info: Eclipse itself starts up with an embedded Java 16 as per SpringToolSuite4.ini:

-startup
plugins/org.eclipse.equinox.launcher_1.6.200.v20210416-2027.jar

The Java version that Eclipse is started with, should not influence the Gradle Buildship plugin, but it does.

Upvotes: 1

Related Questions