Hi. Somebody knows a postgresql library working under Java 8? I tried pg2 but complains with: org/pg/enums/CopyFormat has been compiled by a more recent version of the Java Runtime (class file version 60.0) That means Java 16
Most likely you need next. Jdbc with postgres driver. Pg2 requires java 16
I have no idea whether next.jdbc will work with JDK 8. I haven't tested it against that version for ages and several of the drivers I test against are JDK 11+.
The last version of next.jdbc that was tested against JDK 8 was 1.2.796 -- 2022-08-01 -- so I know that version will work, but later versions may work.
JDK 8 is... very old... and you'll likely need to use older versions of a lot of libraries in order to get stuff to run on it. Is there a reason you need to support JDK 8?
The official JDBC driver is compiled against Java 8.
And you can use it in tandem with next.jdbc.
Will take a look at it tomorrow. Thanks a lot
@seancorfield I confirm you com.github.seancorfield/next.jdbc {:mvn/version "1.3.955"] works with java 8. Reason is related to https://clojurians.slack.com/archives/C053AK3F9/p1731085681331509 I did. Basically, while I get the time to put effort to a complete migration of a Java project I developed to Clojure, I want to implement new features with clojure and extend it as a learning exercise, and the framework used in this project doesn't works with newer Java versions. @jr0cket suggested to implement that new features as parallel project and use REST as communication, but I didn't considered at start because is another layer to learn (REST server implementation, another docker to maintain, another docker to deploy to azure) compared to just include the jar and call the functions, but probably is the best way to go,
Good to know the latest version still works with JDK 8. Just bear in mind I don't test that, so it could easily break in a future version. Officially, JDK 11 is the oldest I support. Rewriting legacy code from the bottom up was part of how we moved from JDK 8 to JDK 21 too.