Tuesday, January 03, 2006

JSE6 (Mustang)

OK then. After a full day spent playing with the latest build of Java 6 (build 65) and surfing the JCP site, it seems that most of the changes are relatively small (compared with the last full release, JSE5 a.k.a. Tiger). There are a few enhancements to some of the swing components and the updated JDBC 4.0 spec has also been incorporated. There are also some quite nice features that have been added to the java.io.File class. Some additional methods enable you to set the readable, writable and executable flag for the object. Also added are 3 methods that enable you to determine the amount of space available in the partition. It does however say (at the moment) that the returned bytes are a hint and not a guarantee.
Another new class has been added to the API, java.text.Normalizer. To be truthful, not sure when I'm going to need this one but it's most likely a useful addition.
Other than that, Joe Developer wouldn't notice much different between JSE5 and JSE6. However, under the hood is where one of the biggest changes Java has seen in that last decade exists.....the byte code verifier. In light, the verifier check to see if the code passed to the interpreter is valid and doesn't break any rules that may crash the interpreter. The way this currently happens is for the verifier to analyze every .class file at runtime, just before it is handed off to the interpreter to execute which is very memory intensive. Mustang now has a split verifier, one which runs at compile-time and one which runs at run-time. At compile-time, the verifier checks the validity of the file and adds information about the code to the compiled .class file. Now, at run-time, the verifier can lookup this extra information reducing the amount of analysis required at run-time, resulting in improved performance. Sun have stated that dependant upon the type of application this increases verification by approximately 50%. Not bad! This performance improvement however will only be available to classes compiled and ran using JSE6. Classes compiled using any other version will be verified using the older version.

0 Comments:

Post a Comment

<< Home