h1ghlevelb1ts

Where are my sources?

Here comes another little Mac tip related to Java programming.

As Java developer you sometimes need to step into the source code of the JDK. Any IDE can do that, provided your JDK comes bundles with the sources jar file (src.jar on Mac). You can check whether you have the sources for your JDK by checking the /System/Library/Frameworks/JavaVM.framework/Versions/1.6/Home directory. If you have the sources installed you should find src.jar there.

Unfortunately, the sources are not installed by default (go figure why), instead you have to download and install the Java Developer Package for Mac OS X. This package is available via the ADC (Apple Developer Connection). The download is for free, but you will have to register with ADC first. Here is a direct link to the Java related downloads. It hopefully works once you are logged in and save you some frustrating searching.

The downloaded package is called Java Developer and is in the pgk format. Given my bad experience with Mac's Java related installers, I wanted to just get the src.jar out of JavaDeveloper.pkg file. But how to unpack a pgk file? unpgk to the rescue. Once downloaded and started you simply drag a pgk file into its window and it will unpack everything into the current directory. Just get hold of src.jar and copy it to /System/Library/Frameworks/JavaVM.framework/Versions/1.6/Home. Thank you very much :)

Why do these type of things have to be so hard? This problem with getting hold of src.jar made me once more aware of how little Apple cares about Java developers. And if I needed any further proof Apple decided now to even deprecate Java. I think Apple is not realizing that part of Mac's popularity is based on mouth to mouth propaganda. For some time nerds (developers) switched to Mac, because it offered something unique. With Mac OS X they got the the power of a Unix-based operating system and a very slick UI. And whom do you ask what new computer to buy? Of course your software developing nerd friend. However, a slick UI will not for ever compensate for more and more restrictions put on these nerds. Together with the absolute ignorant behavior shown in handling hard- and software problems I wonder how long it will take until these nerds will be leaving the Mac again. And what will they recommend their friends then?

Anyways, this little Mac rant came for free with the unpgk tip. Enjoy!

--Hardy

Old comments

2010-11-04Fredrik Rubensson
Yes. Apples behavior is worrying to say the least. It seems like all big software organisations have the same problem with hybris. So will it be linux for you next time? Definitely more respect but comes with cursing when interfacing with monitors and printers.
2010-11-05Hardy Ferentschik
I am not so much worried about monitors and printers. In the end I was always able to work it out and I think much has happened on the Linux side during my Mac times :)
But the Desktop is still superior on the Mac and I am not sure I can give up on instant suspend. I love that I am able to just close and opem the lid to stop resp. start working. It is a massive time saver. Linux distros promise this for ages, but it's just not the same.
comments powered by Disqus