Desktop Java never worked because Sun tried to build their own OS on top of the real OS, duplicating every API and feature. This led to terrible bloat, making every app as heavyweight to launch as Photoshop. Worse, the GUI portions of the Java platform are awful, because Sun is a server company with no core competency at GUIs. The APIs are too clumsy to code to, and compared to any decent Mac app, the results look like a Soviet tractor built on a Monday.
In short, Cocoa kicks Java’s ass for developing any app where the UI matters. That Cocoa is at the heart of iPhone app development gives credence to Steve Jobs’s claim that the iPhone is “five years ahead” of anyone else. What other phone or PDA OS has developer tools and frameworks that compare to Cocoa?