Problem when import other *.jar into SDK

When I import other java class (*.jar) into ignition SDK in eclipse,it succesed when building the module,but it can’t run (java.lang.NoClassDefFoundError showed in log of gateway ),how to import other *.jar into our project and let it run well,Thank you very much!

Are you packaging the *.jar file up within your *.modl file? If not, I believe that’s a first step you’ll have to take. After tackling that, I think you’ll want to add an entry for your *.jar file within the module.xml file, too.

I encountered a similar error myself when creating a module that used two *.jar files instead of one … ended up taking the approach above to resolve my issue. I took the Ant script from the examples within the SDK, trimmed it down and adjusted it to make sure to copy the appropriate *.jar file to the appropriate directory before creating the *.modl file.

Hope it helps!