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”

image

https://docs.geotools.org/latest/userguide/welcome/upgrade.html
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 5.3.8.206

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.

https://helpx.adobe.com/coldfusion/developing-applications/using-web-elements-and-external-objects/integrating-jee-and-java-elements-in-cfml-applications/using-java-objects.html

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

1 Like