gpt4 book ai didi

java - Springframework构建失败

转载 作者:行者123 更新时间:2023-12-03 03:53:37 25 4
gpt4 key购买 nike

我从official github克隆了spring-framework。
我想将其构建为import sources to IDEA
我转到文件夹 Spring 框架并执行

gradlew :spring-oxm:compileTestJava


包装器下载gradle 6.6.1,但无法构建spring-core。
spring-framework\spring-core\src\main\java\org\springframework\core\metrics\jfr\FlightRecorderStartupEvent.java:46:
error: cannot find symbol
@Label("Tags")
^
symbol: class Label
location: class FlightRecorderStartupEvent
我有Windows 10和Java 8。
怎么了也许我需要一些类路径?

最佳答案

阅读wiki页面Build from source。它指出:

Before You Start

To build you will need Git and JDK 8 update 262 or later. Update 262 or later is required due to the dependency on Java Flight Recorder (JFR) types. Note, however, that Oracle JDKs do not include the JFR types. Thus, we recommend an AdoptOpenJDK distribution or similar that includes the JFR types. Be sure that your JAVA_HOME environment variable points to the jdk1.8.0 folder extracted from the JDK download.


由于您的构建无法找到JFR类,因此我假设您没有使用JDK 8更新262或更高版本。您不需要做其他任何事情来构建Spring。

关于java - Springframework构建失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64026888/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com