tags:

views:

59

answers:

1

The goal is that a Java app provides contextual menu functions for files as seen in the Finder, thru the Services menu, on OS X 10.6 (Snow Leopard).

Is that possible from within Java code, or do I need to write a stub in ObjC which then talks to the Java app (via a socket)?

Any sample code around?

+1  A: 

You won't be able add a Service to the Services menu using Java alone. There has to be a .service file in either /Library/Services/ or ~/Library/Services/ for your service to be registered with Finder.

You don't necessarily have to write it in Objective C. You can write a service using Apple Script if you find that easier.

An easy way to begin is writing an Automator Action that calls your Java application on the command line. You just choose "Save as Service" and it saves the .service file in your ~/Library/Services/ folder.

Off Rhoden