Saturday, August 29, 2009

Cold cat kills Java 5

I have just upgraded to Snow Leopard - a few little visual tweaks is nothing to write home about; sounds like most of the effort is focused making the different parts of the operating system 64 bit. The original Leopard came with Java 6 but it was not the default ... for command line applications and applets (does anyone use those?) Java 5 was in use. You could hunt down Java 6 on your hard drive and configure tomcat or eclipse to use it if you liked.

But the upgrade also removed my copy of Java 5! These days even Sun wants to charge extra for any kind of Java 5 support; this is an issue for many Java Enterprise Edition users who are not in a position to upgrade due to corporate policy, version of websphere used etc...

This was my first time building GeoTools on mac with Java 6 - and it did not work (running out of memory during the build). Changing between 32 and 64 bit Java just changed what module the build process failed in. Pointing to a problem with the build tool call Maven; upgrading to 2.2.1 and giving it a lot more memory seems to have done the trick - but I am not really convinced.

If you would like to switch between Java versions:
  1. Use spotlight to find the Java Preferences

  2. Shuffle which version of Java is used

Interestingly I could *see* the older versions of Java on my hard drive - turns out they were all symbolic links to the same Java 6. The path /System/Library/Frameworks/JavaVM.framework/Versions contains a list of what is available.

Other than this only a few of my usual tools required upgrading:
  • An update to Skitch (used to take the above screen snaps)

  • Maven 2.2.1