Retired Document
Important: This document may not represent best practices for current development. Links to downloads and other resources may no longer be valid.
About Jar Bundler
Jar Bundler allows you to package a Java application that may be comprised of various JAR files, class files, and libraries into a package that appears to users as a single file. This makes it easy to install applications on a computer (essentially a drag operation) and to uninstall them when they are no longer needed (by moving the package to the Trash).
With Jar Bundler you create an application-bundle definition from which it generates an application bundle. The bundle contains the following elements:
Information property list file. Most of the configuration information you enter in the Jar Bundler window ends up in the information property list file (
Info.plist
) file of the bundle, which is stored in itsContents/
directory.Java resources. Jar Bundler places the application’s main JAR file as well as all its supporting classes in the
Contents/Resources/Java/
directory of the bundle.Application stub. The bundle includes a small Cocoa application, the JavaApplicationStub, which launches the appropriate Java virtual machine and starts the application. Jar Bundler places this stub in the bundle’s
Contents/MacOS/
directory.Application icon. The application’s icon is stored in the
Contents/Resources
/ directory. By default, Jar Bundler uses theGenericJavaApp.icns
file, shown in Figure 1-1.
Java Dictionary Info.plist Keys provides information on Java application bundles and the keys in the information property list file. For more information on bundles, see Bundle Programming Guide. For details on information property list files, see Runtime Configuration: Information Property Lists.
The Jar Bundler window contains three panes:
Build Information. Determines the values of the main Java-related properties of an application bundle.
Classpath and Files. Lists JAR files, class files, and other files the application needs to run. It also contains additional classpath entries.
Properties. Determines the values of information property list file entries for the bundle, including some Java-related settings.
The sections that follow describe each of the panes’ elements.
Build Information Pane
Figure 1-2 shows the Build Information pane.
Table 1-1 lists the pane’s elements.
Element | Description |
---|---|
Main Class | The main class of the application. Manifested in the |
Arguments to Main | Any arguments to the main class. Manifested in the |
Use OS X Menu Bar | Specifies whether the application uses the Macintosh menu bar or multiple window-bound menu bars. Manifested in the |
Anti-alias Text | Specifies whether the application is to use Java anti-aliasing of text. Manifested in the |
Anti-alias Graphics | Specifies whether the application is to use Java anti-aliasing of graphics. Manifested in the |
Growbox Intrudes | Not supported in Java 1.4.x or J2SE 5.0. Specifies whether the resize control intrudes in a window’s content. When unselected, a white bar appears at the bottom of every window with a resize control. Manifested in the |
Disable .app Package Navigation | Specifies whether users can navigate the application bundle’s contents through AWT file dialogs. Manifested in the |
Live Resizing | Not selectable in Java 1.4.x or J2SE 5.0; automatically enabled in Java 1.4.2 Update 1. Specifies whether the application performs live resizing of windows. Manifested in the |
Enable Hardware Acceleration | Automatically enabled in Java 1.4.x or J2SE 5.0. |
Smaller Tab Sizes | Not supported in Java 1.4.x or J2SE 5.0. |
Choose Icon | Allows you to choose an icon for the application. Manifested in the |
JVM Version | Specifies the version of Java the application must run on. Manifested in the |
Classpath and Files Pane
Figure 1-3 shows the Classpath and Files pane.
Table 1-2 lists the pane’s elements.
Element | Description |
---|---|
Additional Files and Resources | This list contains all the JAR files, class files, libraries, and so forth, that the application needs to run. When you add an item to this list, Jar Bundler adds a corresponding entry to the Additions to Classpath list. |
Additions to Classpath | This list contains additional classpath entries. |
Properties Pane
Figure 1-4 shows the Properties pane.
Table 1-3 lists the pane’s elements.
Element | Description |
---|---|
Type | Four-letter type indicator for the bundle. Must be |
Signature | Four-letter creator code for the application. This value is unique per application; it’s used by OS X to identify applications. Manifested in the |
Version | Version number for the application. For example, |
Identifier | Java package–style name (for example, |
Get-Info Strings | The string displayed as Version in the Finder Get Info window. |
VM Options | Command-line options to add to the |
Development Region | Determines the native region or language of the application. For example, |
Bundle Name | The title of the application menu and the Dock item. Manifested in the |
Info Dictionary Version | Version number of the information property list file format that Jar Bundler is to use in the bundle. Manifested in the |
Set Working Directory to inside Application package | Determines whether the application’s initial working directory is |
Additional Properties | Key-value pairs for properties that Jar Bundler puts under |
Copyright © 2003, 2009 Apple Inc. All Rights Reserved. Terms of Use | Privacy Policy | Updated: 2009-12-01