I just upgraded from Java 6 to Java 7 SDK and am now getting the following error in my ant build:
error: package sun.security.pkcs11 does not exist
Provider p = new sun.security.pkcs11.SunPKCS11(is);
I'm running Windows 7 64-bit. I can compile fine if I switch back to Java 6, but that is not an option any longer. I haven't had much luck finding a solution online. Anybody knows how to resolve this issue?
You will have to convert your application to use APIs which are not restricted. The compiler will warn you quite strictly when you have done such a thing -- this is the consequence of proceeding in the face of those warnings.
See Why Developers Should Not Write Programs That Call 'sun' Packages
I have faced the same problem and i solve it by installing the 32-bit JDK insteade of 64-bit and sure it will work .
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With