Deploying an Executable JAR File

You can make your simple archive or J2EE Client Module into an executable JAR file that you can launch with the java command.

To deploy an executable JAR file:

  1. Select and right-click the simple archive or client icon in the Navigator to display the context menu.

  2. Choose Properties.

  3. Click JAR Options in the tree.

  4. Select Include Manifest File (META-INF/MANIFEST.MF).

  5. In the Main Class field, enter the fully qualified name of the application class that is to be invoked.

  6. Click OK.

  7. Launch the executable JAR file from the command line:

    java -jar myapp.jar         

    where myapp represents your JAR file name.


Related topics

About Deployment Profiles
Creating and Editing a Deployment Profile
Creating and Deploying a Simple Archive to the File System
Running a Project From the Command Line
Running an Application

 

Copyright © 1997, 2004, Oracle. All rights reserved.