How to pack Java Cryptography Extension (JCE) to JDK RPM

Date July 22nd, 2016 Author Vitaly Agapov

I don’t have problem. I am part of problem.

Daniel Keyes «The Minds of Billy Milligan»


Let's imagine you have hundreds of hosts where you automatically install or update HotSpot JDK from the RPM-repository. For example, by RPM dependencies while installing or updating some another software. You maintain your repository by yourself and you'd like to have JDK and JCE in one RPM package.

Then this tiny article will help you.

Step 1. Download JCE from to ~/UnlimitedJCEPolicy

for Oracle JDK 8:

for Oracle JDK 7:

Step 2. Install rpmrebuild

Step 3. Do the job

rpmrebuild --package --change-files "cp ~/UnlimitedJCEPolicyJDK8/*jar ~/.tmp/rpmrebuild.*/work/root/usr/java/*/jre/lib/security/" jdk-<version>-linux-x64.rpm
mv ~/rpmbuild/RPMS/x86_64/jdk<version>.x86_64.rpm <somerepo>

Step 4. Grab the beer

Category: Linux | No comments »


Leave a comment

 Comment Form