Skip to content

Instantly share code, notes, and snippets.

@lhazlewood
Created July 4, 2016 19:57
Show Gist options
  • Save lhazlewood/dc2cdcee5044ae4baf129aa63c588828 to your computer and use it in GitHub Desktop.
Save lhazlewood/dc2cdcee5044ae4baf129aa63c588828 to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
[[ -z "$JAVA_HOME" ]] && echo "JAVA_HOME must be set" && exit 1
cd $JAVA_HOME/jre/lib/security
curl -LO "http://download.oracle.com/otn-pub/java/jce/8/jce_policy-8.zip" -H 'Cookie: oraclelicense=accept-securebackup-cookie'
# backup existing JVM files that we will replace just in case:
mv local_policy.jar local_policy.jar.orig
mv US_export_policy.jar US_export_policy.jar.orig
unzip jce_policy-8.zip
mv UnlimitedJCEPolicyJDK8/US_export_policy.jar .
mv UnlimitedJCEPolicyJDK8/local_policy.jar .
chown root:wheel US_export_policy.jar
chown root:wheel local_policy.jar
# cleanup download file:
rm -rf jce_policy-8.zip
rm -rf UnlimitedJCEPolicyJDK8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment