Hi,
I’m facing a classpath issue when I try to run a task in my project. My task calls some code that reflectively creates an instance of a class. If I manually create the instance, everything works fine, but when I call this code that uses reflection it fails with a ClassNotFoundException error. My problem is very similar to this one, that was posted more than three years ago:
I was able to resolve my problem by manually setting the classloader using Thread.currentThread.setContextClassLoader, but I’m wondering what should be the recommended way to deal with this situation?
Best,
Julien