Living V-5 in a V-3 world

Check the flavor. You got a killer API that you just finished polishing off. You se TDD to develop it and it’s pristine with all green bars and crisp design. You went off and wrote it because a unit test on another project called for it. You feel like a Gladiator that just finished slaying 14 other opponents, a Rhino, and dismantled chariot. You plug prized production back into the calling project and kick off a build to see the tight integration and watch the unit tests paint their colors. “Wrong version! Got 49 but expected 47!” Goes the error message. D’oh! In your haste you never set the JDK level to the appropriate level before going off to waste time on an API that’ll never see the light of production. This just happened to me for about the second or third time in my life. It’s becoming more common to have a mixed version environment for one reason or another. On one project there was some servlet stuff that required either 1.4.2 or 1.3.1 of the JDK. On another project I had a Java 1.5 jar that needed to run on an older 1.4 platform. Even though I only used 1.4 features I couldn’t just change the compiler settings because it depended on unit test utilities also built under 1.5. Have any of you hit your head on similar problems? If so, how’d you fix it? Am I making my life much more difficult than it should be? Holla-back!

3 thoughts on “Living V-5 in a V-3 world

  1. Yes, dude, you’re making your life harder than it seems.

    You should always learn about your target platform before you start. I know, it requires discipline and it’s a pain. But when you say your code depends on unit test utilities built under a newer version, there’s something wrong. You should be able to run the tests under 1.4 and compile the real code under 1.3, right?

    There’s also Retroweaver ( to help going from 1.5 to 1.4, I have used it and it’s way cool.

  2. Oh and what do you mean learn my target platform before I start? In my feeble mind my target platform is Java and I’ve already learned that! (Hence the problems!) WORA in effect right? I guess I’m finally figuring out that bytecode only scales one way nowadays. *Sigh* I gotta look at Retroweaver, I’ve heard about it and it does sound cool.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s