我正在尝试从源代码构建 Spring 框架,但在从 IntelliJ 构建它时遇到了有关 Java 工具链的问题。这是我收到的错误消息:
FAILURE: Build completed with 2 failures.
1: Task failed with an exception.
-----------
* What went wrong:
A problem occurred configuring project ':integration-tests'.
> Failed to calculate the value of task ':integration-tests:compileJava' property 'javaCompiler'.
> Cannot find a Java installation on your machine matching this tasks requirements: {languageVersion=17, vendor=BellSoft Liberica, implementation=vendor-specific} for WINDOWS on x86_64.
> No matching toolchain could be found in the locally installed toolchains or the configured toolchain download repositories. Some toolchain resolvers had provisioning failures: foojay (Unable to download toolchain matching the requirements ({languageVersion=17, vendor=BellSoft Liberica, implementation=vendor-specific})
我已经安装了 Java 17 并将变量 JAVA_HOME 设置为指向安装。
我对 Gradle 工具链配置需要做什么感到很迷茫,而且文档并没有让我更清楚。
我非常感谢您提供的任何指导。
我使用的是从oracle网站下载的Java 17.0.11。