How can i install Java Cryptography Extension (JCE)Unlimited Strength Jurisdiction Policy Files in Ubuntu 16.04.

Please tell me also that how can i check that JCE is installed in my system or not?

  • JCE is now part of using Oracle JDK 1.8-151 or higher version. No need to install separately. – Anver Sadhat Nov 21 '18 at 5:58

You can get them at this PPA

sudo add-apt-repository ppa:webupd8team/java
sudo apt update
sudo apt install oracle-java7-unlimited-jce-policy 

How can you tell if it is installed? This command will succeed :)

For a more upto date Java 8 version run

sudo apt install oracle-java8-installer


|improve this answer|||||
  • Thanks for me this solved long lasting issue with logstash after upgrading it. without this the p12 key files from google throw an error – Brian van Rooijen Oct 6 '17 at 11:48
  • why does it say oracle-java7-? – Raf Sep 27 '18 at 2:56
  • @Raf This is an old answer, I am updating it – Mark Kirby Sep 27 '18 at 10:49
  • Shouldn't the package name be oracle-java8-unlimited-jce-policy – Raf Sep 27 '18 at 13:55
  • @Raf Not according to the repository, ppa:webupd8team/java – Mark Kirby Sep 27 '18 at 15:29

Openjdk comes already installed with JCE

A quick test to see if you have the JCE Unlimited Strength Jurisdiction Policy files installed:

$JAVA_HOME/bin/jrunscript -e 'print (javax.crypto.Cipher.getMaxAllowedKeyLength("RC5") >= 256);'

The command should return true if JCE is installed.

|improve this answer|||||
  • 1
    This is really helpful! – abhi Oct 11 '18 at 17:27
  • Very helpful answer – Sam Mar 1 '19 at 14:57

To see if it has installed, search for the installer. You can try to check in the var directory and into cache. Follow this path:/var/cache/oracle-jdk7-installer/ls. This will give you all the details about JCE and the Policies.

|improve this answer|||||

Installing JCE for JDK7, no longer works from the webupd8 team repository. Follow these instructions for JVM 6 or 7:

  1. Go to the Oracle Java SE download page.
  2. Scroll down ... Under "Additional Resources" section you will find "Java Cryptography Extension (JCE) Unlimited Strength Jurisdiction Policy File."
  3. Download the version that matches your installed JVM, for example, UnlimitedJCEPolicyJDK7.zip.
  4. Unzip the downloaded zip.
  5. Copy local_policy.jar and US_export_policy.jar to the $JAVA_HOME/jre/lib/security (Note: these jars will be already there so you have to overwrite them).

Taken from here.

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.