文档

Java™ 教程-Java Tutorials 中文版
为所有平台使用通用构建文件
Trail: Deployment
Lesson: Deploying Self-Contained Applications
Section: Using File Associations

为所有平台使用通用构建文件

To generate a self-contained application bundle for each platform on which your application runs, you must run the packaging tool on each platform. You have the option of using platform-specific build files or setting up one build file that can be run on all platforms. Platform-specific files can be simpler to set up, but then you must maintain multiple files.

The File Association Demo described in Using File Associations uses a single build file that works on all platforms.

The following elements of the build file support its use for all platforms:

See build.xml for the complete build code.

You can download the source files for the File Association Demo from Self-Contained Application Examples.


Previous page: Providing a Default Argument
Next page: Using Multiple Entry Points