Ridhima Ridhima - 1 year ago 215
Java Question

JCE zip file for JDK 9

I want to try JDK 9 and I need JCE patched.
Where can I get

JCE zip file for JDK 9
Or can I use the one for JDK 8 ?
I searched for JCE zip for JDK 9 but am not able to locate it.
Thanks in advance.

Answer Source

I assume with 'JCE zip file' you mean the "Java Cryptography Extension (JCE) Unlimited Strength Jurisdiction Policy Files".

Apparently in Java 9 you no longer need a zip, see: http://mail.openjdk.java.net/pipermail/security-dev/2016-October/014943.html

Adding, 'Security.setProperty(“crypto.policy”, “unlimited”);' or editing the java.security configuration file will enable unlimited strength.

Additional details:

Example using code to set the property:

import javax.crypto.Cipher;
import java.security.Security;

class Test {
  public static void main(String[] args) {
    Security.setProperty("crypto.policy", "unlimited");
    try {
      System.out.println("Hello World!");
      int maxKeyLen = Cipher.getMaxAllowedKeyLength("AES/CBC/PKCS5Padding");
    } catch (Exception e){
      System.out.println("Sad world :(");


Hello World!
Press any key to continue . . .

java -version:

Java(TM) SE Runtime Environment (build 9-ea+138)
Java HotSpot(TM) Server VM (build 9-ea+138, mixed mode)

Alternatively, edit the java.security configuration file in the JRE installation folder:

  • Open <jre9-home>/conf/security/java.security in your preferred text editor
  • Search for the line "crypto.policy=limited"
  • Change it to "crypto.policy=unlimited"
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download