did anyone used it and does it work if we use exte...
# cfml-general
g
did anyone used it and does it work if we use external jar files to have a java code code
c
The new (in CF 2021)
<cfjava>
tag (or the cfscript equivalent syntax) is specifically to allow you to write inline java inside of your ColdFusion code, and can import java classes if they are required in the java code that follows the import statement. However,
<cfjava>
is not designed to load an external jar to be used within normal ColdFusion code (like within a
createObject()
call).
g
What if there are functions I have written in java As an example I have jar loaded using this.java settings and they are already loaded now So still possibly can use it or not
c
If you want to use them in inline java, I think you still have to use an import statement to load them again in the context of the inline java code (since that is probably executed somewhat outside of the context of regular CFML code). Not sure though - you'd have to test it yourself to see.
g
Hmm interesting Let me try it out and see what it returns
i ended up doing a jar export to the code and then using it because cfjava does not support complicated tasks, it was not even recognizing the method