5

How can a GNU/Linux machine be set up to automatically update a newer version of the Java Runtime Environment (JRE)? The difficulty is wanting to use a newer version of Java (Java 7, at present) and also be reasonably up to date with bugfixes, especially security updates, without excessive manual work.

You can rely on the the O/S distribution, but they are naturally conservative and therefore provide only bug-fixed versions of an older Java version. No Java 7 on RedHat 6.

You can manually download the JRE from the Oracle website, and set your JAVA_HOME environment variable to point to it. But that is impractical when you want multiple machines across an enterprise to be updated.

Is there a practical way to, for example, use Java 7 on RedHat 6 and have the Java 7 JRE automatically (or semi automatically) updated as Oracle release bug fixes for it?

Raedwald
  • 191
  • 1
  • 11
  • 1
    You convince Oracle to do something sane, like put it in a yum repository. – Michael Hampton Oct 08 '12 at 13:44
  • Or convince them to supply a public address of access without authorizing urls... (but then again, their own security issues are more important than their users :) ) – nickpapior Apr 18 '13 at 14:30
  • Would you be O.K. switching to an OpenJDK JRE? These days, there are rarely problems substituting one for the other, and it's _much_ easier to get an up-to-date copy through the package manager. – Groomblecom Dec 11 '16 at 17:32

1 Answers1

1
  1. Oracle doesn't maintain a Yum repository to point to, but you could create one locally and populate it with new releases. Then, point your hosts at your internal repository and have a cron job that regularly updates from it. This has the benefit of using the alternatives system to setup the environment variables for a desired release. In most cases, JAVA_HOME would stay pointing at the default location which is a symlink setup by alternatives.

  2. In a previous job, we had some apps exported via NFS. And I used to symlink the latest version to "latest." The JAVA_HOME can default to this path. This meant one place to update but allowed end users to rollback or override it as needed in their own environment.

Aaron Copley
  • 12,525
  • 5
  • 47
  • 68
  • This question had no answers and was just [copied verbatim](https://serverfault.com/q/878341/50647). I'll assume based on that and the number of views that this might be helpful to someone? Otherwise, I wouldn't bother with something from 2012. – Aaron Copley Oct 13 '17 at 15:27