Category Archives: Leopard

OS X and Java: UnsupportedClassVersionError

A couple of months ago, Apple finally released a version of Java 6 for OS X. With Java 5 fast approaching its end of service life, many Mac developers, including the couple of us who use OS X in production at my office, were eagerly awaiting the release of a production-quality Java 6.

There is one issue, however, with the implementation of Java 6 for the Mac: it only supports 64-bit processors. This isn’t huge for any of us, but it makes Java selection a bit confusing.

At first, I tried to use the OS X Java Preferences to change the default to Java 6. That didn’t work across the board, and I discovered that the link to Java in /System/Library/Frameworks/JavaVM.framework/Vresions/Current didn’t seem to be pointed at Java 6 like I believed it should. I manually set the link to 1.6, but Eclipse isn’t compatible with a 64-bit JVM. So, I decided to manually set the version and path for Tomcat via a statement in my deployment script. Since I was trying to get this done quickly, I put off moving the JAVA_HOME statement into my default .profile which, as I discovered, was a fairly big mistake.

It was then that I discovered something pretty interesting. If you start up Tomcat with one JAVA_HOME and then try to shut it down with another JAVA_HOME, it throws the following:

UnsupportedClassVersionError: Bad version number in .class file

Makes sense, and placing the Java 6 path JAVA_HOME in my .profile fixed the problem, but it proved to be an hour or so of ripping-my-hair-out frustration before I figured it out.


Quick Update

Well, I spent a lot of time last week trying to manage the new installation of Leopard and leverage it with my workflow. I’ve had some issues with Parallels and its handling of 16-bit legacy applications, as well as having to deal with a total crash of my media drive (don’t worry folks, we had a backup).

So far, Leopard does a lot of things very well. I’ll write more in a few days to detail my experiences with it as a whole and relating specifically to my workflow.

And, on a slightly different note, I got an iPod Touch as an early Christmas present (thanks babe)!

On My Leopard Installation So Far …

Well, today I pulled the trigger: I received OS X Leopard (10.5) in the mail and decided to install it. I had most of the night free, so I figured it would be a good time to attempt an upgrade and see what might take place.

Except for a couple of problems (only one Leopard related), things seem to be going pretty well.

I’ll be posting more on this in the next few days, including application compatibility issues (or, hopefully, lack thereof), system performance, etc. For now, while things don’t appear as “zippy” as they did in Tiger, they haven’t been bad by any means.

I did have a problem, after the new Keychain 10.5 update, with my Airport card suddenly disappearing. I went ahead and dragged an ethernet cable over to the Mac and immediately found the culprit (if you’re interested, check this out:

Also, I experienced my first real need to use my RAID array as, somewhere between my upgrade and now, my media drive decided to fail. I’m not sure if it is the drive itself (doesn’t seem to be) or simply data corruption. I am in the process of restoring it now (from backup).

Here’s hoping things continue to go well …