[JENKINS-20163] Fixes #28: do not use a JRE-internal class.