|
If you're using Mac OS X 10.5 (Leopard), then you're probably running some variation of Java version 1.5. While that's all well and good, it turns out that the JAX-WS goodies that I was looking for in my previous post were all standard part of Java SE 6. So I went looking for ways to upgrade my installation of Java and was surprised to find how unbelievably difficult it was to find what I wanted!
First I went to the Apple Developer Connection. I figured that was a likely place to look for information. I found some documentation on some mysterious update that didn't download properly, but I couldn't find anything concrete. When I went to a download site for the JDK, it told me to use Apple's System Update to grab the latest version of Java. I did that and, of course, found out that my version 1.5 was considered up to date since the System Updater couldn't find anything new for me to download.
Then I found some website that had created a Mac-usable port of BSD's version of 1.6. The problem here is that nobody ever modifies or takes down old content on the web. If I hadn't read the date on that web page, I would've made a huge mistake and installed some shaky port of a beta version of 1.6 and I needed the REAL version 1.6.
Finally I went to another area within Apple's developer site and was able to find "Update 1" for Java on Leopard. This page didn't link to any other updates so I downloaded it. Out of curiosity, I went looking for a newer update since this one looked a little old. Remember, Apple's web page for "Update 1" didn't mention the existence of a new update. I went to "teh google" and found that there was indeed an update 2.
You can find Update 2 here .
I downloaded that update and installed it and figured that everything would be fine..but I was wrong :) After the install, running "java -version" still gave me the old 1.5. Some more google searching turned up this:
In Finder, navigate to your Applications/Utilities/Java folder and launch "Java Preferences". In here you can drag the "Java 1.6 SE" installation to the top. After you close that window and then run "java -version" again, you'll be on 1.6 SE 64-bit.
Not being a Java guy, I don't know if this is just common knowledge that everyone but the .NET guys in the room know, or if this really is some obscure information. Either way, I hope it saves someone some trouble because it took me way too long to figure this one out.
Funnily enough, I played this game only yesterday. I also discovered
Updates 1 and 2, but found I didn't need to download them. Looking at the
Java Preferences app, 1.6 was installed already; all I needed to do was
drag it to the top.
The need for Java 6 to get access to the inbuilt JAXWS also drove me to
hunting down the install. To my surprise I see Apple isn't supporting Java
6 for powerpc (I could be wrong). Guess it forces me to upgrade my
hardware (have been holding off for a while).
Apple's Java update naming on MacOSX is to use the American vernacular a
train wreck! They normally refer to "Update N for MacOSX v10.x" which makes
no mention of which java version is involved, although it useful for users
to see what update in a sequence it is for what MacOSX version. However for
1.5 they didn't stick to a single naming convention for the whole series
which made things really confusing.