Back in 2007 when Apple released Mac OS X 10.5 Leopard, a much-heard criticism was the lack of support for Java 6. Leopard shipped with an older version of Java, 1.5, even though 1.6 had been released by Sun almost a year prior. Sun had already released Java 1.6 for Linux and Windows, but did not do so for Mac OS X, since Apple insists on developing their own version of Java, according to Sun. Now, 6 months later, Mac Java programmers can rejoice.Apple has released Java 6 for Leopard, but as was already known, the package only works on the 64bit Intel version of Apple’s operating system, so users of early Intel Macs or PowerPC machines will not benefit from this update – even if you have a G5 Quad, no Java 6 for you.
This Java for Mac OS X 10.5 Update 1 adds Java SE 6 version 1.6.0_05 to your Mac. This update does not replace the existing installation of J2SE 5.0 or change the default version of Java.
Get it from Apple’s download page.
I’m currently working on a Java project on an embedded system. A bit annoyed by all the legacy code I have to work with, I’ll start a small rant against Java to fight my boredom.
The news kinda reveals my biggest gripe against Java. For me it is not portable at all; at least, no more than other languages.
Most platforms feature at least a free decent C compiler. From there either you directly have a modern C++ compiler or you can compile a C++ compiler (i.e. GCC). Even on the embedded systems, it is quite rare not to be able to get a decent C++ compiler (although a lot of programmers in the embedded market tend to dismiss it, ’cause someone told them embedded programming had to be done in C).
Now, with Java, you’re at the mercy of having a decent JVM for the relevant platforms. Of course, major platforms have access to a decent Java 6 VM, but it’s far from being the case on more exotic platforms. Mind the news above: MacOS X had to wait a year to have access to Java 6, and it’s only covering the latest 64 bits Intel CPUs! Personally, I don’t think that MacOS X is such an exotic platform.
A lot of “exotic” platforms do have a JVM, but usually it’s a decent Java 1.2 VM at best, or a quite slow and incomplete Java 1.1 VM at worst. Some programmers are happy with that, I’m not.
In the project I’m working on, they use JNI to interface the Java part with a C++ library doing the core work. While it makes sense from a technical point (the core part needs to be as fast and efficient, the target being an embedded system), it makes things even worse.
Not even talking about the 64 MB eaten up by the JVM (WTF?! 64 MB on an embedded device, just for a GUI ?!). The addition of a C++ library, combining Java and C++ portability shortcomings together, makes the portability of the whole project a nightmare.
I could also go on about all these Java development tools that, as if they were the only relevant Java application, install development tools or libraries that are incompatible with the rest of the system (Eclipse anyone ?)
A bored and annoyed developper.
PS. Yesterday, Eclipse (lastest stable version) crashed about 10 times the Sun JVM (also latest stable version) with some nice segfault. Although I recall someone telling me that segfaults were impossible in Java, I most certainly encountered way more Sun JVM crashes than I found critical bugs in C++ compilers (GCC and VS).