pambrose / prometheus-proxy

Prometheus Proxy
Apache License 2.0
145 stars 23 forks source link

Java 11 Support #104

Open menvol3 opened 3 days ago

menvol3 commented 3 days ago

Hello

I tried to start the latest version of promethues-agent.jar (v1.22.0) on my host and received the error below

Have I missed something?

Error: LinkageError occurred while loading main class io.prometheus.Agent
    java.lang.UnsupportedClassVersionError: io/prometheus/Agent has been compiled by a more recent version of the Java Runtime (class file version 61.0), this version of the Java Runtime only recognizes class file versions up to 55.0

I have Java11 installed from AWS

openjdk 11.0.22 2024-01-16 LTS
OpenJDK Runtime Environment Corretto-11.0.22.7.1 (build 11.0.22+7-LTS)
OpenJDK 64-Bit Server VM Corretto-11.0.22.7.1 (build 11.0.22+7-LTS, mixed mode)
pambrose commented 3 days ago

Can you give Java 17 a try?

menvol3 commented 3 days ago

Yes, I can, but unfortunately, the hosts I’d like to use with Prometheus-proxy are running Java 11 Is it possible for you to build it on Java 11 as well?

pambrose commented 2 days ago

I will give it a try when I do the kotlin 2.1.0 release.

pambrose commented 20 hours ago

Changing the minimum JDK from 17 to 11 seems to be working fine. Let me iron out an outstanding protobuf issue and then I will do a release.