java.lang.RuntimeException: NYI


If we are using PGP based or similar encryption in our email application/module, we may get the following exception.

java.lang.RuntimeException: NYI
    at cryptix.jce.provider.elgamal.ElGamalCipher.engineGetParameters(

Here NYI is Not Yet Implemented ! The default policy setting of Java is not capable of handling encryption/decryption with higher strength keys. To add that support we need to download the Java(TM) Cryptography Extension (JCE) Unlimited Strength Jurisdiction Policy Files.

Download JCE:

Extract the downloaded archive and copy the JAR files (US_export_policy.jar & local_policy.jar) to Java_home/jre/lib/security. If those JAR files are already present in that directory, replace them with the newly downloaded archives.

Hope this helps.