2004-11-07

Why I can't get excited about JDIC

I was wondering this afternoon why it is I find JDIC, the Java Desktop Integration Components, the least interesting of the things I have on my to-do list. And I realized it's because they're really the Java MS Windows Integration Components.

Suppose you're a Mac user, like I am. I also use Linux a lot, but it's such a mess that "desktop" seems stretching the point. "Display", perhaps. If there was a single KDE program worth running, I could quite easily have an Xt application, a Java application, a GTK+ application, and a KDE application sharing the same display. There's probably someone out there still using Motif, also. That kind of hodge-podge does not a desktop make.

So, like I said, suppose you're a Mac user. Suppose also that you're either a Java developer, or the user of a Java application. The question is: what doesn't Java let you do that hampers your Java application's interface?

First some things you can do:

1. You can open a URI in the user's default browser, or open any file in the user's preferred application, courtesy of java.lang.Process and open(1). You can send mail this way too, using a mailto: URI. This is what org.jdesktop.jdic.desktop would give you.

2. You can write an Info.plist for your application that tells Mac OS what file types to associate with you. This is what org.jdesktop.jdic.filetypes would give you.

And some things you can't:

1. Badge your Dock icon to show unread counts/activity/state.

2. Have a dynamic Dock menu, with items specific to your application.

3. Have a standard response to the "About..." menu item. [Apple provides API for this.]

4. Bring up a preferences dialog in response to the "Preferences..." menu item. [Apple provides API for this.]

5. Add application-specific items to your application menu (like Safari's "Report Bugs to Apple...").

6. "Show In Finder". [You can use open(1) to show the directory, but you can't select the relevant file within the directory.]

7. Use the system's spelling checking (and the user's dictionaries). [I've written something to use ispell or NSSpellChecker but that's not the same, and doesn't work on Mac OS as-shipped, or on MS Windows.]

8. Make a JDialog a sheet of its owner.

9. Implement the "Special Characters..." item on every other application's "Edit" menu.

10. Open a file chooser that looks like the native ones and lets you specify file formats. You have to choose between one (AWT) and the other (Swing) because of a dubious argument made long ago, and presumably some corresponding argument for "Save As".

11. Maybe I dozed through it, but where's java.awt.FontDialog? Even an unconvincing javax.swing.JFontChooser would be a start.

12. Automatic support for the "Window" menu. And the "Open Recent" menu item on the "File" menu.

13. Automatic support for an application having a life beyond its open windows/better understanding of a world where there's only one menu bar.

14. Access to the system's address book. [Unlike iCal, Address Book doesn't store everything as text. And as I found out, iTunes only pretends to.]

15. Easy Rendezvous/ZeroConf. This may sound Mac-specific, but iTunes uses it whatever platform it's running on, and that only makes it cooler.

Those are things that would make a difference. Those are all things I've actually wanted. Until I could write TextEdit or Sketch in pure Java, I won't feel integrated. I'm sure MS Windows users and developers have their own lists. I assume that the "system tray", browser embedding, and screen-saver support in JDIC represents what they care about (but although the last two apply to Mac OS, I don't really see that they're particularly useful; especially not the screen-savers).