Keeping Oracle JRE updated?
-
- Posts: 38
- Joined: 2014/11/05 02:00:11
Keeping Oracle JRE updated?
Has anyone figured out a way to keep a previously yum local installed Oracle JRE updated, without the laborious process of checking the confusing Oracle site periodically for a newer version? It seems someone has put together a resource for Ubuntu/Debian to do it. I'm putting the Oracle JRE on all of my deployed desktop systems. I don't guess Oracle built in an updater like the Windows and Mac JRE's have?
Re: Keeping Oracle JRE updated?
Oracle's RPMs come with a license agreement that does not allow for onward distribution so it's not possible for anyone to set up a repo that contains them except Oracle themselves. I'm not aware that there is such a repo.
When I was accessing an HP iLO remote console last night though, my web browser popped up a notification that my JDK was out of date and asked if I would like to update it. That's about the nearest that I've seen to anything like this.
When I was accessing an HP iLO remote console last night though, my web browser popped up a notification that my JDK was out of date and asked if I would like to update it. That's about the nearest that I've seen to anything like this.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke
-
- Posts: 38
- Joined: 2014/11/05 02:00:11
Re: Keeping Oracle JRE updated?
That figures. Do you know if java will notify you on the command line about updates so you can at least run a cron job that checks if updates are pending?TrevorH wrote:Oracle's RPMs come with a license agreement that does not allow for onward distribution so it's not possible for anyone to set up a repo that contains them except Oracle themselves. I'm not aware that there is such a repo.
When I was accessing an HP iLO remote console last night though, my web browser popped up a notification that my JDK was out of date and asked if I would like to update it. That's about the nearest that I've seen to anything like this.
-
- Posts: 38
- Joined: 2014/11/05 02:00:11
Re: Keeping Oracle JRE updated?
Not really a solution but my short term hack is:
The question will be how long Oracle keeps that URL valid. All this does is check the URL against the RPM I have sitting in my kickstart file directory. Which should be the last one I installed the last time I found an update.
Code: Select all
#!/bin/bash
LOCAL=`ls /var/www/html/kickstart | grep jre-8`
URL="http://javadl.sun.com/webapps/download/AutoDL?BundleId=106239"
GET=`curl -Is $URL | grep Location`
FILE=`echo $GET | sed -e "s/.*\(jre-8.*rpm\).*ext=.*/\1/"`
if [ $LOCAL == $FILE ]; then
exit
else
echo "There is an Oracle JRE update available" | /bin/mail -s "java version check" root
fi
Re: Keeping Oracle JRE updated?
As an alternative use the OpenJDK. They both use HotSpot JIT. What you'll loose is some of the JMX and management stuff.
I know the OpenJDK was pretty rubbish sometime ago, but it has improved - give it a try with you application(s).
I know the OpenJDK was pretty rubbish sometime ago, but it has improved - give it a try with you application(s).
Re: Keeping Oracle JRE updated?
Oh, and also the GC algorithms.
-
- Posts: 38
- Joined: 2014/11/05 02:00:11
Re: Keeping Oracle JRE updated?
The Elasticsearch folks recommend using the Oracle stuff. Or at least the Elasticsearch community at large does.aks wrote:As an alternative use the OpenJDK. They both use HotSpot JIT. What you'll loose is some of the JMX and management stuff.
I know the OpenJDK was pretty rubbish sometime ago, but it has improved - give it a try with you application(s).
Re: Keeping Oracle JRE updated?
Well if your application can only use Oracle Java, then you have no choice, either use the ideas from the scripts posted above or ask Oracle to setup a repository (I'm sure they'll do that for you if you give them lots and lots of $$$$$$$$$)
Re: Keeping Oracle JRE updated?
Horrible hack for horrible hack , I thought I'd share mine (applies to the JDK):
Adjust URL with the page of applicable version (7/8/arm/etc.)
Code: Select all
#!/bin/bash
isUpToDate() {
URL=http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
NEW=$(/usr/bin/wget -qO - $URL |grep ^downloads |head -1 |grep -Eo 'jdk-....')
NEWVER=`echo $NEW |grep -Eo [0-9].* |grep -Eo '[0-9]*'`
read -a NEWARR <<< $NEWVER
OLD=$(javac -version 2>&1 |grep -Eo [0-9].*)
read -a OLDARR <<< `echo $OLD |grep -Eo '[0-9]{1,2}'`
return $([ ${NEWARR[0]} -eq ${OLDARR[1]} -a ${NEWARR[1]} -eq ${OLDARR[3]} ])
}
if isUpToDate
then
echo "Java is up to date"
else
echo "Java needs to be updated"
fi
Last edited by giulix63 on 2015/05/05 09:20:50, edited 1 time in total.
Root is evil: Do not use root (sudo) to run any of the commands specified in my posts unless explicitly indicated. Please, provide the necessary amount of context to understand your problem/question.
-
- Posts: 38
- Joined: 2014/11/05 02:00:11
Re: Keeping Oracle JRE updated?
The most irritating thing about these hacks is that they rely on Oracle not changing these fairly cryptic URL's.