How to call java interface name init?

i want call geotool init, same name with lucee create Constructor
i got error message “No matching Constructor for org.geotools.util.factory.GeoTools() found”

geotool example code

Don’t forget to tell us about your stack!

OS: win 10
Java Version: 11.0.11 (AdoptOpenJDK) 64bit
Tomcat Version: WildFly / Undertow - 2.2.3.Final
Lucee Version: Lucee

I don’t know if this holds true for Lucee, but Adobe’s docs has this note:

The init method is not a method of the object, but a ColdFusion identifier that calls the new function on the class constructor. So, if a Java object has an init method, a name conflict exists and you cannot call the object init method.

You’re most likely bet is to call it directly using Java reflection.

1 Like