JCE with Servlets | ERROR: java.security.KeyStoreException: jceks not found
843810Apr 11 2003 — edited Apr 11 2003I'm having some problem with this JCE stuff. I can compile the class, it finds the import fine in the classpath. I have made the keystore successfully. But when I run this simple line of code it doesn't work:
KeyStore keyStore = KeyStore.getInstance("jceks");
I keep getting this error:
java.security.KeyStoreException: jceks not found
I don't get it. When I use the keytool to generate the keystore like this:
C:\>keytool -genkey -alias myNewKey -storetype jceks -keystore MyKeyStore.store
Please, someone, anyone, help!
Dan
FYI: I have copied Jce1_2_1.jar, US_export_policy.jar, sunjce_provider.jar into <java-home>/jre/lib/ext and the java.security file has been updated with the addtional line (Security.provider.2=com.sun.crypto.provider.SunJCE). I'm running jdk1.2.2