quinta-feira, 16 de julho de 2015

How to update Oracle Java on Ubuntu - faster then PPA releases

It usually takes a few days for a PPA repository to update Oracle JAVA releases.

You can solve this (for Debian based Linux distros) by making packages using "java-package" a few times (for various architectures), then distributing them internally.

If you don't have it installed open a console and type:

sudo apt-get install java-package

The big plus side is that this method always works; no matter how crazy Oracle's web pages become. Oracle can no longer break my build or stop my work, specially when Internet-banking depends on it!

The downside is that it's a bit more work to set up initially.

STEP-BY-STEP (ie. as the old music goes...)

1. Download the tar.gz files manually using your browser (ie. thus "accepting" their terms)

http://www.oracle.com/technetwork/java/javase/downloads/index.html

2. Run at prompt command:
         make-jpkg <java-package-name-xxx.tar.gz>.
   this will create a file named: "oracle-javaX-jXX_X_XXX.deb"
   Note that you may get some messages during the make-jpkg, just ignore them.

3. Distribute it within your organization (or your family devices)

For distribution over the Internet, I suggest using a password protected apt repository or provide raw packages using symmetric encryption:

passphrase="Hard to crack string. Use /dev/urandom for inspiration."
gpg --batch --symmetric --force-mdc --passphrase-fd 0 \
   oracle-javaX-jXX_X_XXX.deb <<< "$passphrase"

Of course providing (unencrypted) .deb packages on the internet is probably a violation of your license agreement with Oracle, which states:

    ... Oracle grants you a ... license ... to reproduce and use internally the Software complete and unmodified for the sole purpose of running Programs"

On the receiving end, if you have a password protected apt repo, all you need to do is apt-get install it. If you have raw packages, download, decrypt and dpkg -i them.

Works like a charm!

REF: http://stackoverflow.com/users/337079/mogsie

Nenhum comentário:

Postar um comentário