I’ve been tinkering with lucee 7 (L7). I’m running an experimental version of the lucee app that powers our CRM. I love how snappy everything feels. I came across the Java Class Interaction link documentation at:
JAVA CLASS INTERACTION
I love the idea of being able to import java classes just using import. Currently in our app I use the following:
var jarpath = expandPath("./assets/pdfbox/")
var jars = [
jarpath & "pdfbox-3.0.5.jar",
jarpath & "fontbox-3.0.5.jar",
jarpath & "pdfbox-io-3.0.5.jar",
jarpath & "commons-logging-1.2.jar"
]
var loader = createObject("java", "org.apache.pdfbox.Loader", jars)
I’m dynamically loading the jar files for the latest version(at least back when I created this) of pdfBox.
On experimenting with L7’s implementation; loading the pdfbox jar I used:
import org.apache.pdfbox.Loader;
On refresh of the page, this generates no errors. My assumption is that it’s loading whatever version of pdfbox that lucee ships with. Not the version that I have stored in my assets directory.
With the import statement, is there a way to direct it to my assets folder?