
Java on OS X, slowly fading away
Most of the great and compelling desktop applications for the Mac are written in Objective-C, a somewhat strange language but still very similar to C and C++. Objective-C was branched from the GCC GNU compiler and therefore is free and open software, with the code of the GCC Apple branch made available here: http://gcc.gnu.org/viewcvs/branches/apple/trunk/gcc/
Most of the code in this branch is between 8 and 13 months old, which may only suggest that the repository does not get update very often, still Objective-C gets a major overhaul for the first time in a very long time. The Objective-C language is being changed and not in a small way, like David shows in his recent article at informit.com:
- Objective-C is now be able to create managed code, meaning like C# and Java, Objective-C object falling out of scope will be garbage collected by a Runtime Engine and not being released by developer written code. Objective-C adds __strong and __weak type qualifiers for pointers, notifying the runtime garbage collector of how to deal with it.
- Like David also mentions, the dot notation to access properties (just like one would do in C++) has been added too.
- And there is another example of Objective-C borrowing a feature from a different programming language: automatic generation of property accessors.
A property just needs to be annotated in the Interface (yes, Objective-C like C and C++, separates definition and implementation) like@property int aProperty;
as readable or read-write, and accessor methods (setters and /or getters) will be generated automatically using this implementation:@property (ivar = anInstanceVariable, copies, setter = aSetMethod:) int aProperty;
The most current Java Runtime Versions for Mac OS X are:
- Java 1.4.2 Update 2 (for Macs running OS X 10.3 Panther) branched of Sun's JRE 1.4.2_12
- Java 2 SE 5.0 Release 3 (for OS X 10.4 Tiger )
Well, like aforementioned, most great and compelling desktop applications for the Mac are written in Objective-C and maybe there really isn't any incentive for Apple anymore, to keep Java up to date on the Mac, at least not with the responsiveness we have grown used to.
What would bum me out if Apple totally dropped support for Java. We don't build Mac desktop applications here, but for us Mac OS X is like Linux. We developer our web application, and without an up to date JVM, we'd have to drop Mac as the development platform and switch to Linux. Some of our engineers already use Linux, but I really would rather stay on Macs.
I like having Mac as an option for our engineers; it's a much smaller administrative investment than getting all the right video drivers and X configurations working. Some programmers like fooling around with that stuff, and some don't. The Mac is a nice choice for the folks who don't want to keep track of all that.
On the other hand, if Apple did completely drop support for Java, maybe Sun would just provide the port of it, and it wouldn't lag behind the Solaris and Linux releases so much!
Bill, chief architect, kayak.com
Subscribe