Open hendrikebbers opened 1 year ago
The current java_client
version is still backwards compatible with Java 6. You need JDK <= 11 to compile it from source, because Java compilers later than 11 dropped support for Java 6 output.
I am currently working on an 1.0 release with a major refactoring (to support Prometheus native histograms). I think with that release we'll drop Java 6 support and use Java 8 as the baseline.
Note that this is only for compiling client_java
from source. At runtime you can use client_java
with any Java version >= 6, there are no compatibility issues at runtime.
I created a PR to add the info to the readme https://github.com/prometheus/client_java/pull/830
Next to this the build is still not working since simpleclient_caffeine depends on https://github.com/ben-manes/caffeine version 3.X that only supports Java 11+
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project simpleclient_caffeine: Compilation failure
[ERROR] /Users/hendrikebbers/git/prometheus_client_java/simpleclient_caffeine/src/main/java/io/prometheus/client/cache/caffeine/CacheMetricsCollector.java:[3,42] cannot access com.github.benmanes.caffeine.cache.AsyncCache
[ERROR] bad class file: /Users/hendrikebbers/.m2/repository/com/github/ben-manes/caffeine/caffeine/3.1.1/caffeine-3.1.1.jar(com/github/benmanes/caffeine/cache/AsyncCache.class)
[ERROR] class file has wrong version 55.0, should be 52.0
[ERROR] Please remove or make sure it appears in the correct subdirectory of the classpath.
With Java 11 the project should build successfully.
When I just call
./mvnw verify
in the repo the build ends with the following error:Full build log