tags:

views:

457

answers:

3

I would like to make my Java/Swing application compatible with the Services-menu available on Mac OS X. For example, so that the user could select some text in JTextArea and have it converted into speech by Services -> Speech -> Start Speaking Text. Is there a simple way to achieve that? (The application should still be able to run on platforms other than Mac OS X.)

+1  A: 

I'm inclined to say no. If I recall correctly, services are only available to Cocoa applications, and Java apps are not Cocoa applications.

mipadi
+2  A: 

Have a look at apple's OSXAdapter package (link requires free apple developer login) for java development. The samples included in the package shows you how to integrate nicely to the OS X application menu in a way that is only activated when your application is running under OS X.

kasperjj
A: 

This seems to work on Mac OS X Leopard, with no change to the original application. So I've lost interest in the answer (to how to make it work on Tiger). Thanks for your contribution, however.

Kaarel