简体   繁体   中英

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.

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

在此处输入图片说明

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM