Using Java 5 Features in Older JDKs
BlueVoodoo writes "Java 5 added a number of powerful language features: generics, enumerations, annotations, autoboxing, and the enhanced for loop. Even if you're stuck on JDK 1.4, you can still use generics. Use Java and theory to learn how."
Can't get to TFA for some reason, but isn't this the point of Retroweaver?
I've worked in a an environment where 1.4 and lower is mandatory. This was down to management believing that 1.5 was too new and 'untested' even though Sun obviously thought it production worthy.
:)
These kind of people would be very scared if you tried to write code using 1.5, recompile the byte code using some new-ish open source toolkits and then putting it in to production. Then again, you could do it without telling anyone.
It's great that IBM is writing this, but these tools have been around for years. They basically came out the same time as the final release of Java 1.5 (or "5.0"), when many people realized that it would be tricky to deploy programs that were using the new features. By now, everybody should have updated to 1.5 anyway.
EagerEyes.org: Visualization and Visual Communication
Java 1.6 is out now. 1.5 is so, like, last year.
Autoboxing, a bad idea - automated!
Hey, Windows users, there is no such thing as "forward" slash, there is only slash and backslash.
This is another option used by the people that make GlazedLists, so that they can support Java 5.0 and 1.4 with the same code base: http://publicobject.com/glazedlists/wiki/index.php ?title=Declawer
please excuse my apathy
You can use the undocumented, unsupported 'jsr14' target in javac to compile 1.4-compatible bytecode from 1.5 source. No need for Retroweaver or other tools:
javac -source 1.5 -target jsr14
I'm the current maintainer for Retroweaver and the article does not mention all the Retroweaver features:
...
Annotations are supported, the concurrent backport is used for the concurrent packages, runtime classes can provide support for new features or replace classes entirely,
I suppose the article is based on the 1.2.5 version and not the beta version(s). I guess I followed the Google model of having a really long beta cycle with a stable product...
Seeing the possible confusion with the Beta tag, I just decided to release the official 2.0 version earlier today.
Xavier
or did anyone else read the title and see "Using Java 5 Features in Older *JoKes*"
Support NYCountryLawyer RIAA vs People
Disclosure: I'm the Retroweaver author.
The article seems to miss all of the features that Retroweaver has added over the past year. I think the author may not have been paying attention to the active releases on-going with Retroweaver. For example, Retroweaver supports every feature that the author purports is specific to Retrotranslator.
I have been spending less of my personal time on Retroweaver over the past year, but Xavier Le Vourch has been doing an excellent job improving Retroweaver over that period.
Bah, still stuck with the old URLConnection in 1.4.2 that dosn't have a timeout. Ah well, got my hopes up there for a moment. On a sinde note, anyone know how to set the timeout of Sunlabs.brazil's HTTPConnect?
"Have you ever thought about just turning off the TV, sitting down with your kids, and hitting them?"
While it's true that most businesses should have upgraded to 1.5 a long time ago, that's just the server side. Most Mac computers still run Java 1.4; I develop Java games for PC and Mac and I need them to run on 1.4.
Retroweaver is a great tool that allows me to use the language features of Java 1.5. I miss the improved 1.5 standard classes, ie. the improved string manipulation (String.format() with printf formatting for instance). At least I get a warning from Retroweaver..