Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 238
Tgwizman Avatar asked Mar 12 '12 01:03

Tgwizman


People also ask

How do I make a jar file executable on Mac?

jar is executable. Because Mac OS X ships with the Jar Launcher application, the end user needs only double click on the jar file and the application will launch. To make the jar file executable, the manifest must include the name of the Main class file.

How do I set default applications on Mac?

Permanently change the app used to open a file You can also Control-click the file, then choose Get Info. In the Info window, click the arrow next to “Open with.” Click the pop-up menu, then choose the app.

How do I change the default program for a jar file?

To change the default program that opens jar files, right-click the jar file, select Open With, then Choose default program. In the Open With window, click the Browse button to open the File Explorer window.

Can a Mac open a jar file?

On Mac. Install Java on your computer if it isn't installed. You can't run JAR files without Java installed on your computer.


1 Answers

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.

like image 115
trashgod Avatar answered Oct 04 '22 17:10

trashgod