Java 1.6 on OS X (Safari/Webkit crashes on start)
... or maybe it's Java 6 on OS X? - I can't remember how they're versioning the JDK these days.
After installing the recent Apple update for Java I started getting the "invalid target release: 1.6" error when attempting to build a maven project. After some digging I found that the CurrentJDK symlink was pointing at 1.5 again, instead of 1.6, so I corrected that:
letdown:~ joel$ cd /System/Library/Frameworks/JavaVM.framework/
letdown:Versions joel$ sudo ln -s -f -n 1.6 CurrentJDK
This fixed maven (and, incidentally, I was also able to compile Cassandra without having to specify JAVA_HOME explicitly) and I thought all was well again.
A day later Safari crashed and attempts to relaunch it repeatedly failed. After a few attempts I clicked on the "Send Report to Apple" button and scrolled down to see what was being sent over. I noticed a line near the top said something about the JDK, which reminded me of the change I'd made above. Sure enough, switching CurrentJDK back to 1.5 allowed Safari to start without any problems. With Safari started again I went to Preferences and unchecked "Enable Java" in the Security tab. After that, I was able to point CurrentJDK at 1.6 as well as start Safari.
Hopefully this will save someone a little time if they encounter the same problem.