Jump to content
  • entries
    1212
  • comments
    1738
  • views
    1144953

Ugh

Sign in to follow this  
johnhattan

85 views

Yeah, I'm gonna harp again. If you're already tired of my well-earned dislike for Java and/or my pleas for you to avoid engine development, then move along, because I've gotta rant again.


Yep, Java did it to me again. This time we had something that should've been quite innocuous turn into a big mess thanks to Java. One of our ISP's machines was going bad, so one of my client's pages was moved to another machine. We had to make a few tweaks here and there to accommodate a changed IP address, but with about an hour's work, we had it all going again.

Or so I thought. As soon as my clients handed off the new URL's to his clients, they started complaining that the applets were no longer working. All we did was change a hard-coded IP address in one of the applets, so it was the furthest thing from our minds that we broke the applet by simply recompiling it. Well, it turns out that I recently upgraded Java to that new version 1.5 (formerly Java 2, go figure) so I could try out a pal's Java-based simulation (which of course didn't work, but that's another tale). Turns out that replacing the old 1.3 compiler with the 1.5 compiler generated code that was no longer compatible with some older VM's.

Thus far I've broken Java's backwards compatibility by using classes that are unavailable on some VM's. I've broken Java's backwards compatibility by using class member-functions that are identical to other functions but aren't available on some VM's. And now I've broken Java's backwards compatibility by recompiling with a compiler that apparently generates classes that earlier VM's can't read.

I ended up pulling out all of the 1.5 stuff and downgrading everything to Java 1.3 compiler and runtime. Sure enough, everything now works fine on my side and the client's. I'll likely never again upgrade my Java runtime or compiler for this very reason. Inevitably, something will break somewhere.

I remember the "write once, run everywhere" promise that eventually morphed jokingly into "write once, port everywhere". It's not even that now. It's "write once, break somewhere", and you just hope that the "somewhere" is a place you can test it. Java's biggest promise was platform-independence, and the only thing that Java managed to do was make the situation worse! When "platform independence" started looking like a problem that was solving itself as OS's became more compatible with each other, Java exacerbated the problem by becoming a runtime system that WASN'T EVEN COMPATIBLE WITH ITSELF!


I now see why Sun was so mad at Microsoft. Sun's point wasn't "We don't want Microsoft to screw up Java". It was "We're worried that Microsoft won't screw up Java as well as we plan to!" Well, congratulations Sun. Microsoft's officially out of the Java picture now, so you've got nobody to blame but yourselves for the sad state of Java.

My best hope for Java now is that hopefully Sun will go bankrupt before they can screw it up any more. Then maybe a more capable company will pick up the rights at auction and will make Java a decent system again.
Sign in to follow this  


1 Comment


Recommended Comments

Guest Anonymous Poster

Posted

You can make your 1.5 compiler produce 1.3 bytecode by setting the compiler source and target parameters. See page 398 of my book, "Advanced Java Game Programming". -- David Wallace Croft

Share this comment


Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!