O'Reilly logo

Mac OS X for Java Geeks by Will Iverson

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Application Bundles

Native Mac OS X applications are delivered in packages known as application bundles. These packages contain the application’s executable code, images, sounds, icons, localizable strings, and other resources. An application, as shown in the Finder, is actually just a specific directory structure with a few additional attributes.

These application bundles are displayed in the Finder with a simple name (for example, TextEdit). Users can double-click on these application names, complete with colorful icons, and the system automatically launches the application. Alternatively, users can drop documents on the application, and the launched application will attempt to open the selected document.

For a developer, however, an application bundle is a directory with an .app suffix and a specific internal file structure. You can explore these bundles on your system from the Finder by Control-clicking on an application and selecting “Show Package Contents,” as shown in Figure 7-2.

Opening an application package

Figure 7-2. Opening an application package

Layout of an Application Bundle

Once you peel back the layers of an application bundle, you’ll find quite a few directories, each with several files. Figure 7-3 shows the structure of a typical application bundle for a Java application (in this case, the open source Java application PCGen; for more information on PCGen, visit http://sourceforge.net/projects/pcgen/ ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required