Why updating Oracle JDK breaks links to JCE policies?
Issue
I've been adding them to /etc/alternatives as such, which worked fine, before upgrading Java to java-1.8.0-oracle-1.8.0.91-1jpp.1.el6_7.x86_64
update-alternatives --install /usr/lib/jvm/jre-1.8.0-oracle.x86_64/lib/security/local_policy.jar jce_1.8.0_oracle_local_policy.x86_64 /opt/UnlimitedJCEPolicyJDK8/local_policy.jar 1000000 --slave /usr/lib/jvm/jre-1.8.0-oracle.x86_64/lib/security/US_export_policy.jar jce_1.8.0_oracle_us_export_policy.x86_64 /opt/UnlimitedJCEPolicyJDK8/US_export_policy.jar
After the Java Update the alternatives are still configured correctly, but the Java Package removes the softlinks in /usr/lib/jvm/jre-1.8.0-oracle.x86_64/lib/security
pointing there. Which means java uses the default policy, and my application doesn't work anymore:
ls -lart /usr/lib/jvm/jre-1.8.0-oracle.x86_64/lib/security
...
local_policy.jar -> /etc/alternatives/jce_1.8.0_oracle_local_policy.x86_64
US_export_policy.jar -> /etc/alternatives/jce_1.8.0_oracle_us_export_policy.x86_64
Environment
- Red Hat Enterprise Linux 6
- java-1.8.0-oracle-1.8.0.101-1jpp.1.el6_8.x86_64
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.