In an earlier post, Migrating to Oracle SQLcl 25.3 (with JavaScript), I described how we kept our Broadpin SQLcl based DevOps pipelines running after SQLcl dropped Java 11 support. The fix back then was to move to Oracle GraalVM for JDK 17 and install the JavaScript component with gu install js.
That recipe works, but it has an expiry date. The gu component installer does not exist on GraalVM for JDK 21 and later, and the JavaScript engine is no longer part of the JDK either. So the moment you move the toolchain forward, the gu install js step from part one silently stops being an option, and the script command breaks in a new way.
There is a lifecycle reason to move as well, not only a technical one. Oracle GraalVM for JDK 17 is an LTS release, but it reaches the end of its regular Premier Support window in September 2026, after which only the paid Extended Support uplift remains, through September 2029. Oracle JDK 17 itself already stopped receiving free updates in September 2024 for anyone without a subscription. Oracle GraalVM for JDK 25 is the current LTS and carries Premier Support through September 2030, with Extended Support to September 2033. In other words, keeping GraalVM 17 around just to host the SQLcl JavaScript engine now means pinning a core piece of the toolchain to a release that is right at its regular support cliff. So this migration is worth doing on its own terms, independent of the gu change.
We have now moved to Oracle GraalVM for JDK 25 together with SQLcl 26.2, so here is the follow-up: how to get the SQLcl script command working on GraalVM for JDK 25. The examples cover both Linux and macOS. Only the GraalVM install and the way you set JAVA_HOME differ by platform. The actual fix, a small version-pinned Maven fetch plus one JVM option, is identical everywhere, and applies to Windows as well.
Note that on GraalVM 25 this is uniform across operating systems. In part one, Linux still behaved differently from Windows, since some setups kept a working JavaScript engine on the older JDKs. That difference is gone now: GraalVM for JDK 21 and later ship no JSR-223 bridge on any platform, so the same fix is needed on Linux and macOS alike.
The Maven technique for pulling the GraalJS artifacts is based on Chris Hoina's article on doing the same for ORDS and GraphQL, ORDS and GraphQL: using Maven to build the polyglot and js dependencies for GraalVM for JDK 21. ORDS ships none of the GraalJS stack and therefore pulls all of it. SQLcl is the same: it does not bundle the GraalJS runtime either, so you fetch the whole set from Maven and copy it into lib/ext.

