Building Applications with MRJAppBuilder

If you have the Developer Tools software suite installed on your Mac, then you can use the MRJAppBuilder application, found in /Developer/Applications, to bundle Java files into Mac OS X-style applications. This program is intended for use by Java developers to make their programs more Mac-friendly, but Mac users who know a thing or two about Java can also use it in order to assert friendliness upon Java programs they encounter.

Figure 10-4 shows MRJAppBuilder’s main interface. As you can see, the most important information you need to provide is the name of the Java class that contains the main method, which you can type into the “Main classname” field. Alternately, you can click the Choose... button to navigate through your filesystem and find the .jar or .class file that contains this class. Once selected, MRJAppBuilder presents you with a menu of all the classes that file defines, as Figure 10-5 shows.

MRJAppBuilder

Figure 10-4. MRJAppBuilder

MRJAppBuilder’s class menu

Figure 10-5. MRJAppBuilder’s class menu

Choosing an output file

Figure 10-6. Choosing an output file

You can then supply the application-to-be’s class path by placing it as a colon-separated list in the Classpath text view. (Unfortunately, ...

Get Mac OS X in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.