opentable/otj-pg-embedded

Java 8 compatibility

vbocquel opened this issue ยท 3 comments

Hello

Describe the bug
The README states that the project is Java 8+ compatible and while I saw the commit to restore the compatibility, the published version of the lib seems to be compiled with Java 11.
While running on Java 8 (1.8.0_342 in my case), I have the following error :
java.lang.UnsupportedClassVersionError: com/opentable/db/postgres/embedded/DatabasePreparer has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0

It works as expected when switching to Java 11.

To Reproduce
Run any test project on java 8 I guess ๐Ÿ™‚

Expected behavior
Not throw this error and run the tests properly when using Java 8 ๐Ÿ™‚

Screenshots
/

Machine (please complete the following information):
I'm running this on a Gitlab runner built from the docker image openjdk:8u342-jdk-bullseye

Additional context
I'm using it from an SBT project :
"com.opentable.components" % "otj-pg-embedded" % "1.0.2" % "it",

We do in fact no longer support Java 8. Thanks for the ticket, the README is updated.

To be clear AFAIK, changing the POM to build Java 8 should work, you are welcome to create your own private build. However since we have not used Java 8 at OT in 5 years, I don't want anyone to think we can actually support or test on a regular basis.

Thanks for the clarification ๐Ÿ‘
I completely understand, Java 8 is not really trending ๐Ÿ˜