gradle无法定位平台&java运行时只能识别55.0以上的类文件版本

z0qdvdin  于 2021-07-24  发布在  Java
关注(0)|答案(0)|浏览(153)

我的第一个错误:
无法使用工具链“jdk 11(11)”以平台“java se 15”为目标。为了解决这个问题,我进入settings->build execution deployments->build tools->gradle search for gradle jvm。将其更改为所需的jvm(openjdk-15)现在我有一个新错误:

Error: LinkageError occurred while loading main class com.pinodev.helloServer.HelloServerApplication
    java.lang.UnsupportedClassVersionError: com/pinodev/helloServer/HelloServerApplication has been compiled by a more recent version of the Java Runtime (class file version 59.0), this version of the Java Runtime only recognizes class file versions up to 55.0

这是我的密码:

package com.pinodev.helloServer;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

@SpringBootApplication
public class HelloServerApplication {

    public static void main(String[] args) {
        SpringApplication.run(HelloServerApplication.class, args);
    }
}


暂无答案!

目前还没有任何答案,快来回答吧!

相关问题