简体   繁体   中英

What version of Java hamcrest-all v1.3 compatible with?

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

In the source code for Hamcrest 1.3 the file BUILDING.txt includes this statement:

--[ 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.

This is further supported by the javac command in the Ant build.xml ...

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

So, it looks like Hamcrest 1.3 is compatible with Java 1.5 but according to the authors ...

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

By contrast, Hamcrest 2.x presumes Java 1.7, from the build.gradle :

import static org.gradle.api.JavaVersion.VERSION_1_7

sourceCompatibility = VERSION_1_7
targetCompatibility = VERSION_1_7

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