# Include third-party libraries in custom module

**URL:** <https://forum.inductiveautomation.com/t/include-third-party-libraries-in-custom-module/85293>\
**Category:** Module Development\
**Tags:** sdk\
**Created:** [February 6, 2024, 1:53pm UTC](https://forum.inductiveautomation.com/t/include-third-party-libraries-in-custom-module/85293 "2024-02-06T13:53:00Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![BenS](https://avatars.discourse-cdn.com/v4/letter/b/9fc348/32.png) [@BenS](https://forum.inductiveautomation.com/u/BenS)\
**Post date:** [February 6, 2024, 1:53pm UTC](https://forum.inductiveautomation.com/t/include-third-party-libraries-in-custom-module/85293/1 "2024-02-06T13:53:00Z")

</div>

For the module that I am developing, I need to include third-party libraries in a directory where they can be accessed by Ignition. The only way I have been able to do this so far is to copy those libraries into in the /usr/local/bin/ignition/lib folder on my Linux machine. However, when I update Ignition that folder is overwritten, which means I need to copy the libraries again. Is there a way add an additional path to the list of directories that Ignition checks for library files?

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [February 6, 2024, 1:55pm UTC](https://forum.inductiveautomation.com/t/include-third-party-libraries-in-custom-module/85293/2 "2024-02-06T13:55:50Z")

</div>

> [@BenS](#):
>
> Is there a way add an additional path to the list of directories that Ignition checks for library files?

There is, by modifying ignition.conf, but it only works for Gateway-scoped dependencies. Is that enough?

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [February 6, 2024, 2:26pm UTC](https://forum.inductiveautomation.com/t/include-third-party-libraries-in-custom-module/85293/3 "2024-02-06T14:26:25Z")

</div>

If the third-party modules are appropriately licensed (and you include any corresponding acknowledgements in your module's own EULA), then you can package them inside your module. And upgrades won't smash your kit.

You can also use your module hook's own classloader, use reflection to obtain its `.addJarFile()` method, and dynamically load just about anything. If you go this route, you have to take care that your classes that directly reference any of its content are only referenced indirectly by Ignition's module lifecycle methods.

---

<div class="post-metadata">

**Author:** ![BenS](https://avatars.discourse-cdn.com/v4/letter/b/9fc348/32.png) [@BenS](https://forum.inductiveautomation.com/u/BenS)\
**Post date:** [February 6, 2024, 2:49pm UTC](https://forum.inductiveautomation.com/t/include-third-party-libraries-in-custom-module/85293/4 "2024-02-06T14:49:04Z")

</div>

Thanks all! I've figured out how to include the `.jar` libraries in the module, but the issue here is that the `.jar` libraries require some `.so` (or `.dll` if on Windows) libraries to be available at runtime - these are the libraries that I need to include in the `lib` folder.

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [February 6, 2024, 3:20pm UTC](https://forum.inductiveautomation.com/t/include-third-party-libraries-in-custom-module/85293/5 "2024-02-06T15:20:41Z")

</div>

Include them with your module and extract them on startup. You're on your own there, no built in mechanism.

They'll have to land in one of the folders defined by the system property `java.library.path`. Like the class path, this can be modified in ignition.conf.
