Skip to main content

Command Line for Making EAR/WAR/JAR Changes on the Fly

Extracting the Contents of the EAR

To extract the contents of the EAR:

  1. Navigate to the directory containing the EAR, ear-file.

  2. On the command line, enter the following to view the contents of the EAR:

    jar tf ear-file
    
  3. On the command line, enter the following to extract the contents of the EAR:

    jar xf ear-file
    

Updating and Repackaging an EAR File

To update a file and repackage the contents into an EAR file:

  1. Navigate to the base directory of all the files and folders that are to be part of the EAR.

  2. On the command line, enter the following to extract the contents of the EAR:

    jar cf ear-file input-files
    

    For example,

    jar cf myear.ear *

Comments