epesh
I'm Joseph Ottinger, editor of TheServerSide.com.

Calendar

««Nov 2009»»
SMTWTFS
1234567
891011121314
15161718192021
22232425262728
2930

My Bookmarks

My Top Tags

                                       

Mailing List

My RSS Feeds








Search Box

 

J2SE 5.0

posted Monday, 20 December 2004
After quite a bit of consideration, I finally took the plunge and started using J2SE 5.0 in anger. I set up Orion to use 1.5, set up some projects to use 1.5, browsed a book in draft on 1.5 to sort of bone up on syntax and capabilities, and set to work.

The syntax of 1.5... I dunno, I'm not a jury or anything, but I thought it was... okay.

Generics worked well for me, I thought, although I haven't really needed them in my pre-1.5 code. Maybe that's just me - I don't have a problem with letting my editor handle casts for me, and even outside of that editor, it's not a huge drain on my available brain cells.

The new for syntax was okay, too, I guess, although one aftereffect of the new syntax was that you had to use the generics facility if you were iterating over collections. This was amusing, in a "I wonder what happens when I integrate with older code" sort of way - but I'm not to worried about it. I'm pretty sure I'm competent enough to compensate for any issues, in the long run.

I didn't use annotations - I'm a longtime protester of putting deployment information in source files, in Java, and I see no reason to change that yet. (Plus, this particular application didn't need a deployment phase.)

At runtime, though... here's where the lights came on. I wanted to see how the runtime was using memory, so I fired up -verbosegc... but that only shows gross usages. Since Calvin Austin was saying how useful jconsole was, and I trust Calvin, I thought I'd fire it up and see what it told me.

... Wow.

For memory tuning, jconsole shows all of the various sections in heap, including the tenuring information, survivor space sizings, eden usage... everything. It's slower than running without a monitoring application, as you'd expect, but this kind of detail is incredibly useful - and a feature I've been begging profilers to offer for a long time.

I'm sold. I'm going to start relying on 1.5's VM, because it's finally telling me the things I need and want to know. The language syntax features are okay, but the VM rocks.