[JENKINS-22834] Support additional classpaths

[JENKINS-22834] (https://issues.jenkins-ci.org/browse/JENKINS-22834): continuation of #1.