Tgwizman
Tgwizman

Reputation: 1538

Set a .jar as the default application? (Mac OSX)

Is there a way to set a .jar application as the default program to open .blah files on Mac OSX? I know how to set a .app as a default application, but the .app is the only file type not grayed out when you go to choose an application as a default.

What should I do about it?

Upvotes: 7

Views: 4090

Answers (2)

Andrew Thompson
Andrew Thompson

Reputation: 168825

Launch the Jar using Java Web Start. The launch file provides the ability to set-up a file/content-type association. Here is a demo. of the file services that..

..prompts the user to associate file extension .zzz (simply a file type unlikely to clash with existing file associations) of content type text/sleepytime. ..

To do that at run-time in a JWS app., look to the IntegrationService introduced in 1.6.0_18+.

JWS is designed to work on OS X (and Windows & *nix).

Upvotes: 1

trashgod
trashgod

Reputation: 205785

As discussed in Java Deployment Options for Mac OS X, you can create a Mac OS X Application Bundle that "can associate specific document types with your application. This lets users launch your application by double-clicking a document created by your application." See also more About Info.plist Keys.

Upvotes: 3

Related Questions