Instantly share code, notes, and snippets.

@vando /jdk-8u60.md Secret
Created Jan 12, 2017

Embed
What would you like to do?

Install the utility for creating Java Debian packages

apt-get install --no-install-recommends java-package

The script make-jpkg in Debian 7 doesn't support Java 8. For solving it edit the file /usr/share/java-package/oracle-j2sdk.sh and insert a few lines, at line 49, right after the check for jdk-7u:

      "jdk-8u"[0-9]"-linux-x64.tar.gz") # SUPPORTED
            j2se_version=1.8.0+update${archive_name:6:1}${revision}
            j2se_expected_min_size=310 #Mb
            j2se_priority=319
            found=true
            ;;
        "jdk-8u"[0-9][0-9]"-linux-x64.tar.gz") # SUPPORTED
            j2se_version=1.8.0+update${archive_name:6:2}${revision}
            j2se_expected_min_size=310 #Mb
            j2se_priority=319
            found=true
            ;;

And create the DEB file

wget http://public-repo-1.hortonworks.com/ARTIFACTS/jdk-8u60-linux-x64.tar.gz
{ echo Y ; } | make-jpkg jdk-8u60-linux-x64.tar.gz
mkdir /srv/salt/deb
mv oracle-j2sdk1.8_1.8.0+update60_amd64.deb /srv/salt/deb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment