travis-ci/travis-cookbooks — Issue #35: Provide multiple JDKs
Author: michaelklishin
Created: 2012-02-28 02:45:14+00:00
State: open
Labels: clojure, groovy, java, ruby, scala

Our support for multiple runtimes is well known: 11 Rubies, 5 Pythons, 5 OTP releases, 6 PHP versions, etc. JVM languages, however, only have 1 JDK to test against. It would be a killer feature to provide multiple JDKs. For example, if we do so, JRuby will move to Travis. And we all want JRuby on Travis, right?

Installing multiple JDKs is not a problem, although we need to investigate licensing of IBM JDK (J9). JDK 7 .deb packages (the most important JDK at the moment, since JDK 6 is 6+ years old and will be EOL in November this year) are available in Ubuntu 11.10 repositories or multiple other sources.

The hardest part is implementing JDK switcher that uses Debian tools like `update-alternatives` or `update-java-alternatives` and also takes care of JAVA_HOME value and so on. We also need it to support aliases because `update-java-alternatives` aliases are long, irregular and impossible to remember (examples: java-1.7.0-openjdk-amd64 and java-1.6.0-openjdk).

Minimal viable implementation of this feature would include JDK switcher, OpenJDK 6 (available from packages in 11.10) and OpenJDK 7u4+ (available from packages in 11.10).

FYI: @joshk @mattmatt @svenfuchs @rkh