Using Java 5 Features in Older JDKs 37
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."
Re:Retroweaver (Score:4, Interesting)
Personally I'm a bit frustrated by this being a noteworthy topic... I'm a Java dev and I really wish accomodating pre-java 5 JVMs wasn't ever needed. Reminds me too much of web development.
Re:These have been around for years (Score:5, Interesting)
Anyways, Java 5 has some great features but nothing that is absolutely required from my department's point of view. Autoboxing is a nice feature that helps clean up your code, but nothing we can't do now. Same for the new for-each loop. I could go on but this has been discussed to death already. I would rather we just upgrade so we can start taking advantage of the new features and supposed speed increases.
Re:These have been around for years (Score:2, Interesting)
I agree with the former, at least. I work for a fairly large organization where nothing terribly critical or large is running on Java, but they still won't standardize, so some things run JVM, some run 1.3, some 1.4, and several apps need specific patch levels of 1.3 or 1.4.
Misinformation about Retroweaver (Score:4, Interesting)
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 [sourceforge.net] has been doing an excellent job improving Retroweaver over that period.
Re:Fun but not massively practical (Score:3, Interesting)
So to add mouse-wheel support to our applet for those actually using a new JVM, I had to jump through a whole bunch of hoops involving reflection to load classes that exist just to implement the MouseWheelEventListener interface and do a callback to the code. Annoying, I had to do a similar thing to get anti-aliasing to work as well.