Retrotranslator

Reading this interview with Jean Elliott, director of product marketing for the Java SE platform at Sun Microsystems, got me into thinking about adoption of Java platform editions among developers (and plain users). I think that 1.4 is still very widely deployed runtime environment out there and that it is the main reason why many developers still hesitate to use Java 5 syntax and features in their projects.

There are three kinds of projects that we can differentiate:

  • applications developed for the managed environments
  • applications developed for unknown (potentially large) customer base
  • and libraries developed to be used in other Java applications

In the first case there is no restriction for the development team and their management to make an appropriate case study and upgrade their development and runtime environments. This is well documented in Wall-Mart’s case (mentioned even in Jean’s interview).

In other two cases, this issue becomes even more important because you don’t want to restrict yourself by limiting number of hosts (projects) your code is compatible with.
But existence of Retrotranslator (and Retroweaver) project makes this excuse obsolete.

Retrotranlator is a

Java bytecode transformer that translates Java classes compiled with JDK 5.0 into classes that can be run on JVM 1.4

which basically means that you can very easily make all of your Java 5 code compatible with JVM 1.4. Retrotranslator even offers Ant and Maven tasks that are very easy to use. So there is no reason why you shouldn’t modify your build process to create distributions for both platform editions. Of course, there are some limitations introduced in this process, so additional testing is required.

I think that this is very important topic for wide range of Java projects and that would be great to see Sun back a project like this one.

Leave a comment

Your email address will not be published. Required fields are marked *