packages-jpl icon indicating copy to clipboard operation
packages-jpl copied to clipboard

Question concerning versions

Open GaryKopp opened this issue 2 years ago • 3 comments

Will JPL work with OpenJDK 17? The Wiki calls for Java 11. I'm also confused about JPL and SWI Prolog versions. A github issue seems to suggest that JPL works with SWI 8.3.8, but the latest (?) SWI doc calls JPL a package for SWI 7.x. Can anyone straighten me out on this?

GaryKopp avatar Oct 03 '22 21:10 GaryKopp

JPL is since long bundled with the SWI-Prolog source and most binary distributions. And yes, recent versions run with JDK17 AFAIK.

JanWielemaker avatar Oct 04 '22 06:10 JanWielemaker

Yes; JPL7 (the current, bundled version of JPL) interfaces to any compliant JVM from Java 8 onwards (see below).

Its jpl.c uses the JVM's Invocation API, which must be supported by all JVMs.

Its class files (in jpl.jar) are currently built to bytecode version 52, i.e. Java 8, and will not work with earlier JVMs, but (thanks to Java's traditional backwards bytecode compatibility) should work with any future JVM version.

Note to JPL maintainers: avoid "modernising" the source code without compelling reason, or otherwise building it to be incompatible with older JVMs; Java 8 will be around for a while yet, if not indefinitely...

NB JPL7 is a rewrite of JPL 3.x.x necessitated by breaking changes to the term model in SWI-Prolog 7

anionic avatar Oct 04 '22 19:10 anionic

Many thanks for the reassuring answers.

GaryKopp avatar Oct 04 '22 23:10 GaryKopp