Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
#!/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
You can’t perform that action at this time.