7.1 Packaging

The first issue you must consider when dealing with a standalone application is its packaging. End users are used to loading a CD, installing a program, and then clicking an icon that launches the application. These users of desktop software typically don't want to deal with lots of configuration files and subdirectories, or with components of an application scattered all over a hard drive. Developers, however, need to be able to create applications with some degree of sophistication, which often means including a large number of files in a single distribution of an application. Trying to balance these conflicting desires is the first goal in application packaging.

7.1.1 Packaging on Windows

The latest versions of Java support a more or less cross-platform approach through the Java JAR mechanism, whereby JAR files are launched by an application distributed as part of the JDK. On Windows, this application is called javaw, and is also used to launch Java applications for which one does not want a DOS terminal to appear.

The "double-clickable JAR" approach lacks sophistication, however. For example, it has no support for defining an icon, for binding the application to specific documents, or other application packaging details. These deficiencies lead to a less than stellar user experience.

7.1.2 Packaging on Mac OS X

Native Mac OS X applications, on the other hand, use a specific application packaging format for delivering desktop applications. At the core of this format, the base desktop navigation user interface (the Finder) maintains the illusion that directories with specific names or settings should be treated as applications. There are no fancy resource forks to be dealt with, and generally, application directory packages can be copied across foreign filesystems without damage.

This chapter looks at how to build double-clickable applications and how to create Mac OS X directory packages.



     
    ASPTreeView.com
     
    Evaluation has Р¶МУЧЪіПєexpired.
    Info...