Module Idea for Importing Jars

I had a thought after trying to figure out the new module SDK and signing process. all the modules we have created internally are just wrappers to get various Java libraries from jar files into different scopes of the Ignition architecture.

Would it be possible to create a module that when the module started up it examined the contents of a directory on the gateway server and if it contained jar files it could then load them into each scope of the gateway for use? is there a function in the Ignition API for each scope that could take a jar file and load the library for use?

Is this something that could be native to ignition? i believe this is similar to the way the python libraries can be added to ignition.

So your modules are just loading jars and nothing else? No addition of scripting functions that use those jars?

Have you actually verified that classes from these jars are then available in gateway-scoped scripting functions? I wouldn’t expect that to work… Client and designer scope, sure, but not gateway.

Yes, i am not adding any scripting functions to the module just loading the jars.

I think you are right about the gateway scope. I believe i ran into that problem when i was trying to create JFreeCharts in a gateway script so that i could dynamically create charts and email them out. And for that i had to just drop the jar files into Program Files\Inductive Automation\Ignition\lib\core\gateway.

I believe i do not need to do that anymore since the reporting module was changed in 7.8. the report module can now run in the gateway scope and uses JFreeCharts.