MRJAppBuilder
MRJAppBuilder is a utility that packages already-compiled Java applications to run as Mac OS X applications. When you first convert your application to Mac OS X, it may be useful to create a skeleton application with MRJAppBuilder rather than creating one from scratch, as described in the last section. However, MRJAppBuilder has a serious limitation—once you’ve used the utility to generate your application wrapper and quit MRJAppBuilder, you’ll have to make changes by hand or re-enter everything.
Tip
JDK 1.4.1 includes a very similar replacement to MRJAppBuilder called "Jar Bundler.” The steps for using Jar Bundler are very similar to those for MRJAppBuilder.
MRJAppBuilder can be found in your /Developer/Applications directory. When you launch the application, you’ll see the interface shown in Figure 7-9.

Figure 7-9. MRJAppBuilder main properties
Technically, the information in the
“Application” pane is all you need
to make a Mac OS X application. All three fields are required. The
“Main
classname” field lets you specify the fully
qualified class that contains the main( )
method you want executed on application startup. This field
represents the value of the property
com.apple.mrj.application.main
(in effect, it sets the
MainClass key). Whatever JAR file you select when
you follow the dialog is added to the
“Classpath” field automatically.
If you want to use JAR or ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access