I need to use a library installed on slave.
Till JDK8 I used a hack to load this library:
ClassLoader clsLoader = ClassLoader.getSystemClassLoader();
if (URLClassLoader.class.isInstance(clsLoader))
{
File ff = new File(pahtToJarFile.jar);
Method method = URLClassLoader.class.getDeclaredMethod("addURL",
URL.class);
method.setAccessible(true);
method.invoke(ClassLoader.getSystemClassLoader(),
ff.toURI().toURL());
}
But in JDK11 it is not working anymore.
Is there a way to add a jar installed on the slave to the classpath using
Jenkins configuration?
--
Sent from: http://jenkins-ci.361315.n4.nabble.com/Jenkins-dev-f387835.html
--
You received this message because you are subscribed to the Google Groups
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/jenkinsci-dev/1579878365796-0.post%40n4.nabble.com.