Between Oracle and the various GNU/Linux distributions the damn Java ball has been dropped!
Really unprofessional from both sides, I don’t care for the technicalities, both sides screwed up and your users are suffering.
Basically along with Oracle’s security update 29 the terms that allow Linux distributions to distribute the Sun JRE and JDK have been removed. This required Debian/Ubuntu/Mint to remove the package as per this bug report.
So what the hell are our Java options for production servers?
Turns out that the only real solution at the moment is to manually download and install the JRE / JDK from Oracle. Which may be exactly what Oracle wants but for production software there really is no other option:
- Production servers must be security patched.
- We can’t hope that production code will work 100% on openJDK.
- OpenJDK-6 is in Debian Squeeze, but openJDK-7 is not.
- IntelliJ IDEA does not support openJDK.
- It would madness to develop on one JDK and deploy on another at this stage.
Further Oracle’s license terms are not fun and include a ‘call home’ function…grumble…
Anyway until this mess is corrected by the parties involved download the Oracle JDK:
Register for email security update notifications:
Follow this Debian/Ubuntu how to:
My JDK install steps:
- Install openjdk-6-jre OR openjdk-6-jre-headless to keep Debian package dependencies happy.
- Remove all sun-java6-* packages (BIG security holes remember...)
- Ensure that any browser plug-in's are removed (icedtea-plugin, sun-java6-plugin).
- For 32bit OR for 64bit
- mkdir -p /usr/local/bin/java/32 OR mkdir -p /usr/local/bin/java/64
- cd /usr/local/bin/java/32 OR cd /usr/local/bin/java/64
- Download: wget --no-cookies --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com" "http://download.oracle.com/otn-pub/java/jdk/6uXX-b12/jdk-6uXX-linux-yyy.bin"
- chmod +x jdk-6uXX-linux-yyy.bin
- Run the self extracting file: ./jdk-6uXX-linux-yyy.bin
- ln -s /usr/local/bin/java/32/jdk1.6.0_XX /usr/local/bin/oracle-java-default OR ln -s /usr/local/bin/java/64/jdk1.6.0_XX /usr/local/bin/oracle-java-default
- update-alternatives --install "/usr/bin/java" "java" "/usr/local/bin/oracle-java-default/bin/java" 1
- update-alternatives --set java "/usr/local/bin/oracle-java-default/bin/java"
Note: that we can now use our /usr/local/bin/oracle-java-default symlink in all further setup.
Note: that XX must be replaced by the latest version and yyy must be replaced by x64 or i586 in the above steps.
To install browser plugin for each user:
- In Iceweasel/Firefox Tools -> Add-ons -> Plugins -> Disable Java Plugin.
- Copy the three commands below, shut browser down.
- mkdir ~/.mozilla/plugins
- rm ~/.mozilla/plugins/libnpjp2.so
- ln -s /usr/local/bin/oracle-java-default/jre/lib/i386/libnpjp2.so ~/.mozilla/plugins/ OR ln -s /usr/local/bin/oracle-java-default/jre/lib/amd64/libnpjp2.so ~/.mozilla/plugins/
- Start browser and check that Add-ons shows correct Java Plugin version.
To setup Tomcat:
- Edit: nano /etc/environment
- Set: JAVA_HOME=/usr/local/bin/oracle-java-default
- Edit: nano /etc/default/tomcat6
- Set: JAVA_HOME=/usr/local/bin/oracle-java-default
To upgrade Java version using our symlink:
- cd /usr/local/bin/java/32/ OR cd /usr/local/bin/java/64
- Download .bin file (see wget command above), chmod +x, run the self extracting file: ./jdk-XuXX-linux-yyy.bin
- rm /usr/local/bin/oracle-java-default
- ln -s /usr/local/bin/java/32/jdk1.6.0_XX /usr/local/bin/oracle-java-default OR ln -s /usr/local/bin/java/64/jdk1.6.0_XX /usr/local/bin/oracle-java-default
To check Java versions:
$ java -version
visit http://java.com/en/download/installed.jsp
tuxta says:
I guess any future framework need will be filled by Yii for me. Grails is awesome, but Oracle has come to kill the party.
December 21, 2011, 19:30gavingc says:
Or back to Python :-O I have had a few people tell me it’s pretty good for web development now. Na stuff it just use Javascript from front to back!
December 21, 2011, 21:45tuxta says:
hmmmmm, Just straight C using cgi. Yep, that’s the winner, not going to change any time soon.
December 21, 2011, 23:13