gpt4 book ai didi

java - Java hamcrest-all v1.3 与什么版本兼容?

转载 作者:行者123 更新时间:2023-12-02 11:37:00 24 4
gpt4 key购买 nike

我找不到有关该问题的任何信息:Java hamcrest-all v1.3 与哪个版本兼容?

最佳答案

Hamcrest 1.3 的源代码中文件 BUILDING.txt 包含以下语句:

--[ Build requirements ]-------------------------------------

* JDK 1.5
Note: that this is a buildtime dependency for 1.5 specific
features. However the final built jars should run on 1.4
and 1.3 JVMs with some features unavailable.

Ant build.xml 中的 javac 命令进一步支持这一点...

<javac srcdir="@{srcdir}" destdir="build/temp/@{modulename}-${version}.jar.contents" 
debug="${debug}" target="1.5" includeantruntime="false">
...
</javac>

所以,看起来 Hamcrest 1.3 与 Java 1.5 兼容,但根据作者的说法......

it should run on 1.4 and 1.3 JVMs with some features unavailable

相比之下,Hamcrest 2.x 假定 Java 1.7,来自 build.gradle :

import static org.gradle.api.JavaVersion.VERSION_1_7

sourceCompatibility = VERSION_1_7
targetCompatibility = VERSION_1_7

关于java - Java hamcrest-all v1.3 与什么版本兼容?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48863972/

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