Java 5 on Leopard

October 31st, 2007

The rumors of Java 5 being horribly broken beyond all usability on Leopard are, quite frankly, bullshit. It's faster, has better integration with the OS, the Aqua L&F is significantly improved, it has full support for 64 bit and a huge raft of bug fixes and miscellaneous improvements. Everyone's pointing to an uninformed rant on JavaLobby which as it's key example actually highlights a major improvement to the Aqua L&F - the JOptionPane icons should use the application icon, not some obscure artwork that's not used anywhere else in the system. The new dialogs actually allow you to look more like native app, not less. It's even explained in the release notes - heck, the old implementation was probably reported as a bug against Tiger.

Radar #4858198

JOptionPanes did not match the native Mac OS X dialog appearance

Description:

Default info JOptionPanes now use the application's icon, as per the Aqua User Interface Guidelines instead of a message bubble icon. Warning and error JOptionPanes now show the application's icon badged onto the warning or error icon as per the Aqua User Interface Guidelines.

Resolution:

This problem is now fixed in Mac OS X 10.5.

The graphics pipeline has changed in Leopard which means that if you've optimized for the Quartz renderer, you should specifically request it or you may find that suddenly things start going much slower. In most cases the Sun 2D pipeline is faster than the Quartz pipeline - particularly if the code makes Windows specific performance assumptions (most Java 2D code does whether the author knows it or not). So while some applications may run slower by default, most applications run much faster and those that do run slow can switch back to the Quartz pipeline. Change isn't always easy but it happens - stop whining and start coding.

You can complain that there's no Java 6 yet (though all those people complaining aren't getting anywhere with porting their own and there's no excuses now), and you can complain about the lack of information but Java 5 on Leopard is a significant improvement and the engineers at Apple deserve to be congratulated for that - not insulted.

Moments Too Late

October 30th, 2007

My first thought when I heard that the Leopard blue screens being were by Unsanity's APE was "and that's why only fools use hacks like that". So it was with some surprise that I read John Gruber's article on the issue this morning and discovered that the Logitech driver installs APE. Moments before I'd installed the Logitech driver…

Turns out my decision to do an archive and install to get rid of left over cruft from all the software that I've tried was a pretty wise one - I've had the Logitech drivers installed for quite some time, so most likely I would have run into the "blue screen of foolishness".

Needless to say I've gone through the Logitech .bom file and deleted everything it put in place again. Going to have to find another way to get the media buttons working….

Java On Leopard

October 28th, 2007

I was silly enough to open my work email this morning, only to discover that the Apple Java-Dev list had broken out into the age old Java on OS X argument. First up here's what people have reported1:

  • Java 6 is not included with Leopard.
  • The previous Java 6 DP which was pulled from ADC a while back does not run on Leopard.
  • Upgrading to Leopard from a system with the Java 6 DP installed can cause some frustrating issues with switching Java versions.
  • Apparently Java 5 is much faster on Leopard.
  • Java 5 looks different with quite a few tweaks to the Aqua L&F.
  • Some fonts don't look right in Java 5 on Leopard because it uses the Sun 2D graphics pipeline instead of the Quartz pipeline. The Sun 2D pipeline doesn't support sub-pixel antialiasing. You can override the default and there's a few other conditions that trigger the Quartz pipeline to be used by default.
  • Java 5 supports 64bit on Intel Core 2s (but not PPC). There seemed to be some problem with it when using the Java tools in /usr/bin though - can't say I followed that discussion too carefully.
  • Lots of documentation is coming, but not much is available yet.

Pretty sure that's the Java on Leopard wrap up, the other 150 emails to the list were just the usual gnashing of teeth about Apple abandoning Java and how Apple will lose so much business if they don't get Java 6 out yesterday etc etc etc. Of course, Apple's doing better than it ever has before and JavaOne was full of people using Macs - without Java 6 - so it would seem it's all just talk and insignificant numbers of people are actually leaving OS X. As a fresh twist, this time round people are talking of porting OpenJDK to OS X themselves and finally freeing themselves from the evil clutches of Apple! Apparently no one has told them that Java 6 isn't available from OpenJDK either - it will become Java 7 and is quite some way from that yet. I think it's a safe bet that Apple will have Java 6 out long before even a reasonable uncertified port of OpenJDK is available for OS X.

Oh well, time to put my flame proof underwear on - nothing gets people going like Java on OS X posts, for those who subscribe to the comments feed, this one's likely to drown out the Back to the 80s nonsense for a fair while….

Talk Proposals Are Hard

October 25th, 2007

I'm writing up three proposals for the O'Reilly Web 2.0 conference. I think the content is compelling enough but I'm not overly hopeful that any will be accepted because it turns out I really struggle with writing session abstracts. This is actually the first conference I've submitted proposals too so hopefully I'll get better (and faster!) at it with a bit more practice. In a lot of ways I'm actually more interested in just getting practice at submitting proposals than actual speaking at the conference - the timing of the conference is bad, but can be worked around.

That said, if any of them are accepted I'd be pretty happy to start getting some speaking experience and sharing some of the cool stuff we do at Ephox.

Ant SCP/SSH Task Hangs Or Never Disconnects

October 23rd, 2007

If you're using the scp or ssh tasks with ant, you may run into a problem where part way during the upload or never disconnecting after the command completes for the ssh task. There are a couple of possible causes:

  1. The scp problem is almost certainly caused by using ant 1.7.0 or below and jsch 0.1.30 or above. You could upgrade to the latest nightly of ant1 but it's probably easier to just drop back to jsch 0.1.29 which is what ant was developed against and works nicely. Bug 41090 contains the gory details.
  2. If the command you're executing with the ssh task starts a background service or otherwise leaves a process running, that may be the cause of the problem. You can add 'shopt -s huponexit' to your /etc/profile, .bashrc or somewhere like that. I must admit, I'm somewhat vague on the exact details of what that does but the basic idea seems to be to signal any background processes that bash is exiting and then not wait for them to complete (which allows your ssh connection to close). If you're starting a server they'll probably ignore the hup signal it sends and if not, use the nohup command.

Hopefully that will be the last I'll see of that issue.

1 - which seems to mean compiling from source at the moment, since the nightly build directory the Ant website links to is empty