Classpath and third party libraries

Hi all,

how and where i have to set the classpath in order to use an external library.

I packed this lib in the modl file with


but when i try to create an object that is in the scope of TCPDriver4PLC.jar i have this error:
16.21.40 Common.BasicExecutionEngine One-shot task com.inductiveautomation.ignition.gateway.redunda
java.lang.NoClassDefFoundError: it/coeing/tls/PLCDriver/logic/Configuration at it.coeing.tls.PLCDriver.wrapper.ignition.PLCDriver.initialize(PLCDriver.

Urgent Please.

Regards,
Stefano

:smiley:

Found solution:

add a jar scope on module.xml (TCPDriver4PLC.jar)
The scope MUST be the same of the ignition driver.

Cheers,
Stefano

I’m glad you got it figured out. This question is more appropriate for the module development forum, but I noticed that you didn’t have access to it. You should now be able to see it. I’ll leave this here for anyone else who happens to see it and doesn’t know that there’s another forum.

Regards,

There might be some benefit in packaging your external libraries in a separate Ignition module. I wrote a blog post about this a few weeks back. In case it’s helpful:

http://ignitionprogramming.blogspot.com/2011/05/packaging-external-library-as-module.html

Update: A module can only depend on one other module. If you’re thinking about doing what I mentioned in the blog post, check out the new “Note” under the last code block.

Thanks to all.

Regards
Stefano