Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Running a java jar program from OS x

Because it is easy to develop java programs on a Mac using the IDE Eclipse that is how I do it. My customers run the programs on a PC under Windows by clicking on a shortcut that points to a .cmd file containing the code:

cd \buildresume
java -cp BuildResume.jar menu.Menu

To execute the jar file on the Mac, I run it in Eclipse or go to terminal and type in:
java -cp BuildResume.jar menu.Menu

How can I run it as an application in OS X without going to Terminal?

Intel Mac Mini, Mac OS X (10.6.3)

Posted on Apr 26, 2010 5:39 PM

Reply
4 replies

Apr 27, 2010 5:53 AM in response to zscipio

Here is what I have found out so far:
1. Click once on the .jar file in the Finder.
2. From the menubar in the Finder select File -> Get Info".
3 Click on "Open with" and from the popup menu.
4. Select "Jar Launcher", which is built into OS X.
5. Whenever you double click on the .jar file the program will start.

The only questions I have left are:
1. How did the parameter menu.Menu get passed to the execution module?
2. Where is the documentation on how to use "Jar Launcher"?

Thanks for your help.

Apr 27, 2010 9:31 AM in response to zscipio

I have found an even easier way of solving the problem. There is a program called Jar Bundler in /Macintosh HD/usr/share/java/tools/jar Bundler. usr is a hidden directory. I had to do a 'find' on 'jar Bundler' then double click the folder icon that cam up and just built the program icon to execute BuildResume.jar menu.Menu. All works well.

Apple has some great tools if you can just find them.

Running a java jar program from OS x

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.