Java 9 PKCS#11 support
With Java 9, SunPKCS11 doesn't provide a InputStream constructor anymore.
Recommended approach (since at least Java 8):
Provider p = Security.getProvider("SunPKCS11");
/* check for null */
PS: Please also provide a more helpful error message than "Unable to load library" for the PKCS#11 hardware token load (especially if ClassNotFound or MethodNotFound occurred).
We’re looking into this and will update you when we have made some progress.