Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Install on RHEL/CentOS
# See here for JDK 8:
# See here for test to make sure this works:
if grep -q -i "release 6" /etc/*release; then
elif grep -q -i "release 7" /etc/*release; then
wget \
--no-cookies \
--no-check-certificate \
--header "Cookie:; oraclelicense=accept-securebackup-cookie" \
-O \
jar xvf
# Copy them to an alternate location and use update-alternatives so they don't
# get overwritten when Java is updated
mkdir -p /usr/lib/jvm-private/java-1.7.0-oracle.x86_64/jce/unrestricted
/bin/cp -f UnlimitedJCEPolicy/local_policy.jar /usr/lib/jvm-private/java-1.7.0-oracle.x86_64/jce/unrestricted
/bin/cp -f UnlimitedJCEPolicy/US_export_policy.jar /usr/lib/jvm-private/java-1.7.0-oracle.x86_64/jce/unrestricted
update-alternatives \
--install \
$jce_primary_link_dir/local_policy.jar \
jce_1.7.0_oracle_local_policy.x86_64 \
/usr/lib/jvm-private/java-1.7.0-oracle.x86_64/jce/unrestricted/local_policy.jar \
900000 \
--slave \
$jce_primary_link_dir/US_export_policy.jar \
jce_1.7.0_oracle_us_export_policy.x86_64 \
rm -rf UnlimitedJCEPolicy
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.