文档

Java™ 教程-Java Tutorials 中文版
问题和练习
Trail: Deployment
Lesson: Deploying Self-Contained Applications

问题和练习:自包含的应用程序

问题

  1. Which of the following items is not an advantage of self-contained applications?

    1. Users install the application with an installer that is familiar to them.
    2. The application runs as a native application.
    3. The application requires less space on a user's machine.
    4. You control the version of the JRE that is used by the application.
    5. The application does not require a browser to run.
  2. 对或错:MIME type must always be used to set up a file association.

  3. What elements are used to identify the entry points for self-contained applications in the <fx:deploy> Ant task?

练习

  1. Write the <fx:deploy> Ant task to generate a Windows MSI bundle for a simple application named My Sample App. The JAR file for the application is in the dist directory, the main class is samples.MyApp, and output files are to be written to the current directory.

  2. Enhance the code from the previous exercise to create bundles for all Windows installers and define a file association for text files.

检查一下你的答案。


Previous page: Using Multiple Entry Points
Next page: Packaging Programs in JAR Files