Firstly, what is the Lucee Loader?
I’m not a hardcore java dev, so excuse me, if I get any of the terminology wrong.
The Loader in Lucee is the reason why you can easily upgrade and downgrade between Lucee versions, unlike with ACF which can be a complete pain to upgrade / update.
The Lucee Loader defines a stable interface which the updates (
.lco files) plug into / run on top of (i.e. the flat bed truck). It’s a bit like the HAL in Windows or Project Treble in Android. We call it the fat jar, as it bundles all the extensions and is about 6x larger than the
.lco core update files (i.e. the earth mover which does the actual work).
The Loader is found under a normal Lucee install, under
You cannot downgrade below the version of your Lucee loader.
Updating the loader is a manual process and requires stopping tomcat first, replacing the
.jar file and then restarting tomcat.
You can download a loader from https://download.lucee.org/ , it’s labelled
Living with the Loader as a java developer
For those of us working on Lucee java code, this is often a bit of a pain, as you can’t change anything in the Loader interface as it’s stable and hasn’t changed since before I got involved with Lucee.
When developing (coughs hacking) on the Lucee java code, you should never change anything under /loader, you can only make changes under the /core as that’s what goes into the core updates, aka the
If you do make changes the loader, sure, the build tests will pass but when you try and deploy, Lucee with throw an confusing error message saying method not found. Sure it’s there in your source code, but remember, you are deploying against the stable loader interface.
Quick Case Study
I’ve been working on adding support for specifying a custom user agent for Scheduled Tasks, which sounds easy enough, but the
ScheduledTask interface is defined in the loader, so when I tried to deploy, I got the above error message, hmmmmf.
Talking with @micstriit, he explained to me about the use of
*Pro.java interfaces in Lucee, which just extend a Loader interface, allowing us to extended Lucee whilst keeping the Loader stable, thus keeping everything nice and simple for Lucee users.
// FUTURE comment, you will see them scattered across the Lucee code base, next time we decided to update the Loader, those files will be removed and the extra methods merged back into the Lucee Loader interfaces.
Hope that helps someone, feel free to ask questions!