I have a .jar file that I should be able to run by just double-clicking on it. When I do I get dialog box prompting me to pick the application to use to run the .jar file. I have no idea what I need.
I am using the latest version of Tiger. I remember running this file in an earlier version of OS X and having no problems. Could it be related to the fact that with those earlier versions of OS X I had also installed the Developer's Tools?
I haven't installed any developer software apart from what comes standard on a regular Tiger installation.
What do I need to be able to run this .jar file? Do I need another application, or can I use the command line in Terminal?
Thanks.
Hi Bill -
You can indeed launch a jar file from the command line, with the following command:
java -jar yourfile.jar
As well as this you can assign "Jar Launcher" as the default app. to use when you double-click a jar file, as follows (I don't believe you need the developer tools installed for this):
Click once on the .jar file in the Finder and then from the menubar in the Finder select File -> Get Info". Click on "Open with" and from the popup menu select "Other". A file browser window will open. In this window, go to the /System/Library/CoreServices folder and select 'Jar Launcher'. Then make sure the "Always Open With" checkbox is checked and then click Add. Then click the "Change all" button so that any jar file will be opened automatically. Finally, close the Info window and now when you double-click any of your jar files they should run automatically.
I hope this helps, and thanks for choosing macosx.com!
- Brian
--------
Brian S.
MacOSX.com Technical Support
brian@macosx.com
Awesome. Thanks.