Follow Slashdot blog updates by subscribing to our blog RSS feed


Forgot your password?
Programming IT Technology

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."
This discussion has been archived. No new comments can be posted.

Using Java 5 Features in Older JDKs

Comments Filter:
  • Re:Retroweaver (Score:4, Interesting)

    by Sciros ( 986030 ) on Monday March 05, 2007 @01:16PM (#18239082) Journal
    Indeed. It is mentioned at the closing of the article.

    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.
  • by hansamurai ( 907719 ) <> on Monday March 05, 2007 @01:22PM (#18239164) Homepage Journal
    If only everybody has updated to 1.5. The middle tier of our online product where I work is running on 1.4.2 with just a rumbling of upgrading to 1.5. That upgrade probably won't occur for another year for various reasons that I'm not involved in. I think the bigger the company and the bigger the product, the slower the upgrading process is. I think some architects may even be fearful of 1.5, as I just joined a new project that is running on, and they started developing that just last November!

    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.
  • by RevWhite ( 889559 ) on Monday March 05, 2007 @01:31PM (#18239346)

    I think the bigger the company and the bigger the product, the slower the upgrading process is.

    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.
  • by rreyelts ( 470154 ) on Monday March 05, 2007 @02:13PM (#18239918) Homepage

    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.

  • by Dan Hayes ( 212400 ) on Monday March 05, 2007 @03:00PM (#18240578)
    You think that sucks, I have to code to the last MS JVM, which was 1.1.8 I think. A significant proportion of our userbase still uses it sadly - people still running Win98 most likely. It's very annoying... although I did manage to find a bug in JRE 6 within a day of its release which broke a small but not-insignificant proportion of websites serving applets, well done Sun for not spotting that one when testing your new caching system.

    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.

Love may laugh at locksmiths, but he has a profound respect for money bags. -- Sidney Paternoster, "The Folly of the Wise"