Any way to add own class library and use in Groovy rules?

I’ve starting moving some of my more complex rules from xtend to Groovy via the JSR223 plugin. This has been working great, particularly for reusable blocks of code. However, I have some common functionality that I wanted to include in all of my Groovy based rules, so I thought I would make a base class in Java and have my rule classes extend that.

I added my jar to the classpath of OpenHab, and by scripts would compile, but never run. No errors. Just silence. Even when I simplified things and changed it to just a simple “hello world” method on a class in the jar, nothing.

Is there a way to add additional jar files to the class path for use in Groovy rules?



1 Like