Developing Web Applications With Ant by Richard Hightower - HTML preview

PLEASE NOTE: This is an HTML preview only and some elements such as links or page numbers may be incorrect.
Download the book in PDF, ePub, Kindle for a complete version.

Creating a Manifest File for a Stand-alone Application

The goal of this application is for it to work as a stand-alone JAR file. To do this, we need to modify the manifest file that the application JAR file uses to include the main class and the dependency on greetmodel.jar. The manifest entries that this application needs look something like this:
Manifest-Version: 1.0
Created-By: Rick Hightower
Main-Class: xptoolkit.HelloWorld
Class-Path: greetmodel.jar

The JAR file that holds the Hello World Java application needs to run a certain JAR file (in our case, greetmodel.jar), as specified by the Class-Path manifest entry The Main-Class manifest entry specifies the main class of the JAR file--that is, the class with the main() method that is run when the executable JAR file executes.