Wednesday, December 10, 2008

Version Insanity

Java Version Insanity

Like most products, Java gets periodic upgrades and enhancements. Since its initial release in 1996, Java has undergone the following version updates:

  • Java 1.0: The original release of Java in 1996. Most of the language itself is still pretty much the same as it was in version 1.0, but the API has changed a lot since this release.

  • Java 1.1: This version was the first upgrade to Java, released in 1997. This release is important because most Internet browsers include builtin support for applets based on Java 1.1. To run applets based on later versions of Java, you must, in most cases, download and install a current JRE.

  • Java 1.2: This version, released in late 1998, was a huge improvement over the previous version. So much so, in fact, that Sun called it "Java 2." It included an entirely new API called Swing for creating graphical user interfaces, as well as other major features.

  • Java 1.3: This version, released in 2000, was mostly about improving performance by changing the way the runtime system works. Oddly, though this version is technically Java 1.3, it's also called "Java 2 version 1.3." Go figure.

  • Java 1.4: Released in 2001, this version offered a slew of improvements. As you might guess, it is called "Java 2 version 1.4." Keep figuring.

  • Java 1.5: Released in 2004, this version included more changes and improvements than any other version. To add to Sun's apparent unpredictability with its version numbering, this version officially has two version numbers. Sun's official Java Web site explains it like this:

    "Both version numbers '1.5.0' and '5.0' are used to identify this release of the Java 2 Platform Standard Edition. Version '5.0' is the product version, while '1.5.0' is the developer version."

    That clears it right up, doesn't it?

  • Java 1.6: Released in December 2006 (just in time for the holidays!), this version of Java is the latest and greatest. The improvements in Java 1.6 aren't as earth shattering as the Java 1.5 improvements, but Java 1.6 runs faster and better than any previous version of Java.

    For Java 1.6, the product version is "6" (not "6.0"). And remember the extra "2" that appeared magically in 1998? Well, the "2" is gone in Java 1.6. So-unlike the versions between 1998 and 2006-Java 1.6 is officially named the Java Platform (not the Java "2" Platform). Personally, I think someone at Sun has been talking to George Lucas. I fully expect the next version of Java to be a prequel, called "Java 0 Episode 1."

  • Anyway, throughout this book I use the version numbers 1.6 and 6 interchangeably to mean the current version. Of course, Sun isn't finished with Java. The next version, 7 (or 1.7.0), is due in 2008.

You may need to be aware of version differences if you're writing applications that you want to be able to run on earlier versions of Java. Bear in mind, however, that one of the chief benefits of Java is that the runtime system is free and can be easily downloaded and installed by end users. As a result, you shouldn't hesitate to use the features of Java 1.6 when you need them.

No comments:

Post a Comment