Saturday, July 7, 2012

Script for installing Oracle JVMs on Linux

Java developers sometimes need to change the default java installation. On Linux this is pretty easy with update-java-alternatives. This however, will only work with JVMs which are registered properly, typically by some linux package manager. Since Canonical no longer supply any packages for Oracle JVMs due to licensing issues, and Oracle does not provide any support for registering their JVMs with update-java-alternatives, I was recently "inspired" to make a script for managing Oracle JVMs on Linux platforms. It should work with all distributions which have bash support, but I have only tested on Ubuntu 12.04 LTS.

The script is named update-oracle-jvm and you can download a self-extracting binary from github. Just follow the instructions and you should be able to install Oracle JVMs with update-java-alternatives support from the command-line fast and reliably. This is a screen bump of the command "update-oracle-jvm -h":


I hope this small contribution make life easier for fellow java developers on linux. If you encounter any bugs, please use the issue system at github and I'll do my best to resolve them in a timely manner.