What Java are you Aiming for? 1.4, 1.5, or 1.6, your thoughts?

by Tim O'Brien

There was recently an article that Steve Anglin linked to touting Java's performance on Windows Vista. Toward the end of the article, the author mentioned that the platform of choice for Vista is going to be the soon to be released Java 1.6. 1.5 will also be supported on Vista (it will work), and the article said the 1.4 will work, but it's not a big priority. On Macs, there's a whole different calculus of which version of Java to use because anything lower than 10.4 will not support 1.5. Without getting into the details about the installed user base, and the economics of the particular business application I'm building i tell you the decision tree I went through to chose the base level VM version for a client application that needs to be released in the middle of '07:

* 1.6 was ruled out, it's too risky. I mean that's not to say that it isn't something that will work out of the gates, but I tend to give Sun a few months to work out the kinks in any new VM release. Plus, I can't expect to dictate that people upgrade to 1.6 when I'm not sure what sort of support 1.6 will have on existing platforms. Again, this isn't FUD (you Sun employees don't need to start a flamewar). But, 1.6 is not the right choice for a widely distributed retail client application yet.

* 1.4 was ruled out, it's likely to see support end in the next two years (my assumption). Plus, it's going to work on Windows Vista, but I'm going to have to expect that the support of 1.4 is going to stop sooner rather than later. Plus, how old is 1.4 now? Many years. From a business perspective, building on 1.4 is somewhat risky because of what I read on that Vista blog entry - people at Sun are not focused on getting 1.4 to work on Vista, if it isn't getting the same level of attention, it's more likely to be something that will remain unpatched when 1.6 and 1.5 are the priorities.

* 1.5 was selected. It is going to work on everything OSX 10.4 and up, it's going to work on (at least) Windows XP and up. It is sufficiently mature and stable. and, the real reason.... I can't program without both annotations and generics. Plus, all the fancy stuff I want to write about uses 1.5 anyway.

The only place I could see myself using 1.6 is in a server-side application that needed the new support for dynamic languages. In that case, I'm not sending bytecode out into the wild, and I have full control over the operating environment.

Share your own thoughts and experiences?

Please post a comment if you have your own thoughts on this. Especially if you have any "inside" knowledge of support plans. :-) It would be interesting for everybody to see what the current thinking is on which version people are building applications for? I've assumed 1.4 and up, but I'm sure there are still people doing battle with 1.2, out there.


2006-10-17 07:57:43
I never get to pick the language level for anything I work on. It's dictated to me by the production environment at clients. They are usually locked onto 1.4 due to application servers or other considerations. The adoption rate for new JVM/JDK releases at most large companies tends to be 2-3 years behind the release date from Sun. I've even tried using Retroweaver but it's a poor fit for web apps.
Tim O'Brien
2006-10-17 08:00:27
@Ted, Interesting, what was Retroweaver like? How long did you spent using it? and, what worked and didnt work? I contemplated using Retroweaver a little bit, but the idea seemed a little "clunky" to me. But, I hear you loud and clear about having this decision dictated to you. Luckily for my project, there's some leeway in (possibly) requiring an upgrade.
2006-10-17 09:15:09
My experience largely agrees with Ted's. I've been stuck with 1.4 on all but one recent project, and that one was an exception because the client was a big fan of new-technology-for-new-technology's sake. I was spoiled; it was hard to back out of the 1.5-specific code that we'd written when we folded everything back into our common internal libraries.
2006-10-17 09:21:55
As old as this may be, I target 1.3 for my J2EE monitoring application. Some 1.4 and 1.5-only information is used via reflexion, if available.

1.3 is nearing end-of-life... but I will support it as long as it doesn't cost me too much (and if there's demand, of course). Like you, the real jump is with version 1.5, but it will take a looong time until I stop supporting 1.4...
2006-10-17 10:01:09
J2SE 1.5/5.0 makes the most sense. It has annotation support, and is lightweight vs. 1.4.

Java SE 6 is still in beta, but maturing. I don't think it's that risky.

J2SE 1.3/1.4 are fading, but there are still lots and lots of shops that still apparently use 1.4 and even 1.3.

Tim O'Brien
2006-10-17 10:05:35

"J2SE 1.3/1.4 are fading, but there are still lots and lots of shops that still apparently use 1.4 and even 1.3."

Agreed, I find that proposing 1.5 to some clients is viewed as risky, but the Java 5 stuff has been around for years at this point. As for sticking with 1.3, yikes, I'd probably be looing to leave a shop that like that pretty quick. I wonder if people have a hard time retaining talent when teams are forced to use old technologies?

Adrian Sutton
2006-10-17 14:36:58
Apart from being hooked on the new language features, there's no reason that losing support for Java 1.4 should be a concern. If you target Java 1.4, you can still run the application on Java 1.5 as well, or Java 1.6. Java has top notch backward compatibility so you should be able to target the oldest release that makes business sense (cost of missing new features vs benefits of wider target market).
2006-10-17 23:33:42
Eh they all are backwards compatible. In other words, 1.4 applications (and older) run just fine on 1.6. So you can target 1.4 and still enjoy the performance benefit of running 1.6. In other words, you should distinguish between the runtime and the development platform.

Of course opting not to use the 1.5 features such as generics and annotations is increasingly less attractive. By now you should have a good business reason not to use those features before favoring 1.4 over 1.5. 1.6 is not released yet and targeting unreleased platforms is not a good idea unless your projected release date is well beyond the first few service releases of 1.6. Older releases than 1.4 (and increasingly 1.4 itself as well) should be avoided for several reasons: sun does not support them anymore; third party libraries that you will need to depend on are most likely not tested on them; you miss out on all of the performance and scalability work that Sun has rolled out over the past five years.

All of this is assuming that you are looking to create production quality code that will be used by third parties.

2006-10-18 02:33:02
The global local bank I work for just now are still on 1.3.
They even have a special $$$ support deal with Big Blue so they can stay at 1.3 after WebSphere officially quits on it.

As for morale, these guys know they're behind but they don't seem to care much. What I notice though is that they're behind on a lot of 'best practice' concepts too - like unit testing is only just starting to be talked about. Seriously. It makes me wonder - does getting mired in a years old version of Java mire the professional development also? To get Junit and Ant working within their IDE was a major pain, as all the components have 1.4 dependencies, or worse the IDE has 1.3 dependencies...

Its now one of the questions I will ask at interviews - are you using current technologies? only 3 more months to go.

2006-10-18 07:09:38
Banks and insurance companies house some of the most incompetent and unimaginative people alive today :( It is because they are only there to maintain status quo.

I think what you will find is two camps:
1) Technology is part of the company identity/foundation
2) Technology is just something we have

The first group will try to keep fairly current, while group two considers status quo the holy grail. The first group will go for 1.5 / 1.6 while the second group will stick to what was installed originally.

Unfortunately it seems that for group two technology is introduced as rare revolutions, so I wouldn't be at all surprised if their next "upgrade" is not Java.

2006-10-18 08:57:39
We have an application due out at the beginning of November, using JRE 1.6 and Groovy. I've been using Mustang for a while pretty heavily and I think it's ready, beta or not. It's very stable and there aren't any dramatic changes as in 1.5.

The amount of time I've saved using Groovy has been amazing. Any heavy lifting can still be done with Java, but the scripting language support has been a boon. And Groovy can be used with Java 1.4.2 as well, but we decided on Mustang because of, among other things, the new JDBC support.

Tim O'Brien
2006-10-18 09:23:06
@Rupert, as much as I'm not the biggest Groovy fan in the world, your post is refreshing. Go for it, the more people like you to come forward and pronouce Mustang stable, the quicker I'll be able to convince people to use it.

I've installed 1.6 server-side, and *everything* I'm doing runs on it without fail. I'm hoping to be able to use Mustang on the server-side by the start of next year.

2006-10-18 09:44:36
"cost of missing new features vs benefits of wider target market"

Fact is that you can have the new features for those running on recent JVMs. That's what reflexion is made for! As I said in a previous post, my pet monitoring utility uses 1.5 features when available. If running on 1.3 or 1.4, well, sorry, you won't have the same level of details, but I will still work perfectly.

Chris Adamson
2006-10-19 10:34:47

On Macs, there's a whole different calculus of which version of Java to use because anything lower than 10.4 will not support 1.5.

Oh, that's not the half of it

  • As you note, Mac users must have Tiger (Mac OS X 10.4) to run 5.0. Earlier OS X versions would need to run on Java 1.3 or 1.4.
  • Intel Macs don't have HotSpot for the old Carbon-based Java 1.3 and never will, so unless you want to run in all-interpreted mode, you have to plan for 1.4 or 5.0 there
  • Apple's fairly aggressive about dropping support for old versions, so 1.4 may not be the safe bet it looks like (at their JavaOne BoF, they said to start moving off of 1.4 now)

Personally, I've been coding to 1.4 (no generics, no annotations, etc.) by way of the appropriate ant flags, but mostly testing on 5.0 on PPC Mac, Intel Mac, and XP. That way, I'm developing for the current production version of Java, but should (should) run on the previous version if an end-user needs to.

2006-10-19 13:52:59
What difference does it make Java if it runs on Vista? If you are building a thin client J2EE solution, then the front end will be xhtml.

I think companies do not make the leap to the latest and greatest because application servers do not support, or their developers are skilled on previous versions.

There are alot of products based on 1.3 [e.g. TIM] - although good for resume padding, the latest and greatest is not always the most feasible.

Ravi Shankar Nair
2006-11-01 01:09:24
The support for 1.4 is inevitable, since majority of our current implementations are in 1.4. Hence rather than focusing on 1.6, a compatibility for 1.4 and 1.5 has to be assured, as otherwise my option would be to rule ot moving to Vista
Jignesh Soni
2007-02-26 21:43:38
I always put my server side development work on stable version of JAVA but sometimes Application server not supported and same as IDE not supported latest version. So 1st i check which version installed on development server and which version used in IDE.
2007-07-31 07:39:22
I was aiming for Java 1.6 in 2006 and still aiming for Java 1.6 in 2007 :) MacOS still does not support Java 1.6, guess I can post here in a year to see if Java 1.6 is supported on all platforms that Java 1.5 is supported on.
2008-07-11 11:27:52
I made the mistake of downloading java 1.6 to my computer and it ended up having to be uninstalled because it simply did not work. I downloaded it from Sun and I downloaded it as per their advice to the proper windows version I am running. It simply does does not work in my win98se I would also like to ask if java and jre are one in the same. I am not a computer whiz so laugh is you wish.
Tim O'Brien
2008-07-11 12:01:00
@Ms, I'd be surprised if 98 ran anything higher than 1.4. Sorry to hear you've had problems, but it might be time for an upgrade to the system (that OS is a decade old)
2008-07-11 13:52:26
Well you have a good and valid point Tim. I am from the old school and it is simple that I dont try to fix things that are not broke. I run a gateway and I love it. I dont do the fancy things that some do on and with computers. Thanks for your kind words and one day I will buy a new computer. I find the java 1.5 to work just fine for me and my computer. Perhaps at my age its just old and slow running much like me......lol Have a great and blessed day.