How to import .jar files to Ignition v8.1

I am looking for the latest instructions on how to import third party .jar files and make the java classes available to Ignition's Python/Jython scripting environment (Ignition version 8.1).

My specific use case is trying to use the AWS Java SDK to export files to AWS S3 buckets. My plan is to use the v1 SDK as it has a downloadable .jar file. v2 is available but seems to require creation of a maven project and that is a little beyond my limited java know-how (at present).

The Ignition v8.1 manual section on Importing Third Party Libraries only makes reference to importing python (.py) libraries.

A few old forum threads discuss packing the .jar file with Pack200 and placing the packed and unpacked files in lib/core/gateway , lib/core/client , lib/core/designer , or lib/core/common folders, depending on the scope you want to be able to access them in. But those form threads are quite old and seem to apply to v7.9. Those same threads suggest that method is not officially supported.

Any guidance on using the AWS java SDK or suggestion of alternate methods to interact with AWS S3 buckets is appreciated.
Thanks

Hi @tyler.bennett,

The "correct" answer is to use the Module SDK to write a module which exposes the appropriate java libraries through the scripting system.

The GitHub - inductiveautomation/ignition-sdk-examples: Ignition SDK Example Projects repository contains a scripting example as well as some notes about creating a module at the bottom of the README.

You can also checkout the #module-development section for some additional help if needed.

Hope that helps,
Jonathan C

1 Like

@jcoffman Are the "incorrect" ways no longer possible ? I tried to add the jar on the different lib/core/ folders and can't get it to work.

Thanks in advance !

Try placing the jars in lib/core/common. Don't use pack200. Restart your gateway.

Thanks @pturmel
I'm trying to use Jsch but restarting gateway and designer doesn't work.
I can't get it to recognize it or import it.

Does Jsch have dependencies? You'll need to examine your gateway wrapper log shortly after startup to look for library problems. (Not the logs from the web page--the wrapper log text file.)

The wrapper log doesnt show an error
After checking, what doesnt work is the implementation on the designer.
Gateway-scoped scripts seem to find the functions on the Jsch.jar

For some reason the designer doesn't seem to see the jar

I am trying to use Jsch as well. Did you have any success with this?