views:

306

answers:

5

I'm looking at putting together an opensource project in Java and am heavily debating not supporting JDKs 1.4 and older. The framework could definitely be written using older Java patterns and idioms, but would really benefit from features from the more mature 1.5+ releases, like generics and annotations.

So really what I want to know is if support for older JDKs is a major determining factor when selecting a framework?

Understandably there are legacy systems that are stuck with older JDKs, but logistics aside, does anyone out there have a compelling technical reason for supporting 1.4 JDKs?

thanks,

steve

+12  A: 

I can't think of any technical reason to stick with 1.4 compatibility for mainstream Java with the possible exception of particular mobile or embedded devices (see discussion on Jon's answer). Legacy support has to have limits and 1.5 is nearly 5 years old. The more compelling reasons to get people to move on the better in my opinion.

Update (I can't sleep): A good precedent to consider is that Spring 3 will require Java 5 (pdf). Also consider that the lot of the servers that the larger corporations are using are, or will soon be, EOL ( WAS 5.1 is out of support since Sep '08, JBoss 4.0 support ends Sep '09) and that Java 1.4 itself is out of support since Oct '08.

Rich Seller
+4  A: 

Is it possible that someone might want to use it on a Blackberry or similar mobile device? I don't believe they generally support 1.5.

Jon Skeet
I take the general point, but do you know for sure Blackberry requires Java 1.4 or earlier, as far as I can make out it seems that Blackberry 4.1 onwards requires 1.5 now: http://today.java.net/pub/a/today/2009/07/02/blackberry-j2me-development.html#rims-java-development-environment-jde
Rich Seller
That's talking about what you need to *develop* against Blackberry, not what will be running *on* the Blackberry. As far as I'm aware, J2ME is still pre-generics.
Jon Skeet
(It's possible that J2ME v3.0 has removed that restriction, but I wouldn't like to say for sure. There are an awful lot of possibilities!)
Jon Skeet
It's difficult to find out for sure! For development on "big" Java (i.e. not mobile/embedded devices) would you see any reason to stick with 1.4 though?
Rich Seller
Only that some institutions are *hugely* conservative about upgrades etc. I wouldn't be surprised to see a few places still using Java 1.4...
Jon Skeet
(I wouldn't actually use that as a reason to avoid 1.5 in this case, mind you - such places are generally too conservative to adopt another library anyway :)
Jon Skeet
I'm definitely familiar with institutional inertia.
Rich Seller
+1  A: 

We have customers who have only 1.4 installed (AS/400) and where it is an immense burdensome task to have a newer JVM installed. So, I am one of those who would consider Java 1.4 compatability important.

Note: This can most likely be achieved with Retrotranslator after compilation. You would then do all your tests both with a Java 1.5 with the original jars, and a Java 1.4 with the translated jars.

http://retrotranslator.sourceforge.net/

Thorbjørn Ravn Andersen
You have my sympathies! I like the look of that retro translator; wouldn't help me much in this situation, but its handy to know htere is a fallback position. Thanks.
sgargan
+1  A: 

JDK 1.4 went out of support from Sun back in Oct 2008. The only reasons I can think of why you should support your software running on an out-of-support JVM would be backwards compatibility and a customer base that still depended heavily on it.

duffymo
You can still buy Java for Business support for 1.4, and that is planned to go on for some years yet.
Tom Hawtin - tackline
Agreed, but "...I'm looking at putting together an opensource project in Java..." sounds like this project is yet to get underway. It's still an option to standardize on JDK 5 or greater. Personally, I think it's appropriate.
duffymo
A: 

I think it depends on what your project is. We have a client that still uses J2SE 1.4 (JRun, WebSphere 6).

While none of our clients are on J2SE 1.3, we have a few core components that we try to maintain J2SE 1.3 compatibility on (really basic, highly re-usable stuff).

That said, this may not be an issue. For our client, we were able to use some J2SE 1.5 compiled libraries by running the JAR/classes through Retroweaver.

Jack Leow
I had some issues with retroweaver (cannot recall which) but retrotranslator worked without any problems.
Thorbjørn Ravn Andersen