Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4144614

Motivation for -m option missing from jar man pages.

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 1.1.8
    • 1.2.0
    • docs
    • 1.1.8
    • generic
    • generic
    • Verified

        allan.jacobs@Eng 1998-06-01

        The man pages mention the -m option but do not motivate it.

             To use a pre-existing manifest file to create a new jar
             archive, specify the old manifest file with the -m option:

                  example% jar cmf myManifestFile myJarFile *.class

        Why anyone would want to do this is absolutely opaque. There is
        information in bugtraq bug reports, but these should not be the repository
        of the documentation for the jar command.

        A pre-existing manifest file can contain customized headers
        that can be used to describe and label the contents of the jar
        file.

        The default jar manifest for one of the tests that I am working with
        looks like this
        % jar -xvf one.jar META-INF/MANIFEST.MF
        % cat META-INF/MANIFEST.MF
        Manifest-Version: 1.0
        Created-By: Manifest JDK 1.2

        Name: classes/SecurityTestApplet.class
        SHA-Digest: mgXxI1aa9Y1pM2G6h6aSHkZf66w=

        Name: classes/SecurityTest.class
        SHA-Digest: koEViVBN7JJR86uhl7IzI5hAxLU=

        Name: classes/GetAudioTest.class
        SHA-Digest: M2nVAaV/GUiGpw0qYAkv3jhplBM=

        Name: classes/PackageImportTest.class
        SHA-Digest: UQJuuqzHwYR6d9xjLxpuuKZ2rh8=

        Name: classes/GetImageTest.class
        SHA-Digest: rOORt9Bb+uRg05IlC4+Hx2HkVvc=

        Name: images/javalogo52x88.gif
        SHA-Digest: ygISCp2ogX4jA7ocxNLx52Z+PaY=

        Name: audio/spacemusic.au
        SHA-Digest: 0catQiIinPAGeJ4Gmk60BcHQmWM=

        Name: GetAudioTest.java
        SHA-Digest: kMKQlZSWlvV3EbSR2XcrcAFyItI=

        Name: GetImageTest.java
        SHA-Digest: nBegdvZ+L6EwLg80KY9clDGKYxg=

        Name: PackageImportTest.java
        SHA-Digest: /JELPE0twd0BiGutLh97dj4IZ2I=

        Name: SecurityTest.java
        SHA-Digest: odQ3AQnCrecRIDSlWaR7v4ayx3M=

        Name: SecurityTestApplet.java
        SHA-Digest: Fb9tbUV9g5hfwG1EeBIowkQ7ZJE=


        The manifest could contain custom headings that contain useful information.
        In the example below, an Author field is added. This annotated manifest
        can be used, instead of the default, if the command line used to create
        the jar file makes use of the -m option.

        % jar -cmf myMANIFEST.MF two.jar classes images audio *.java


        Manifest-Version: 1.0
        Author: Homer
        Created-By: Manifest JDK 1.2

        Name: classes/SecurityTestApplet.class
        Author: Dante
        SHA-Digest: mgXxI1aa9Y1pM2G6h6aSHkZf66w=

        Name: classes/SecurityTest.class
        Author: Shakespeare
        SHA-Digest: koEViVBN7JJR86uhl7IzI5hAxLU=

        Name: classes/GetAudioTest.class
        Author: Cervantes
        SHA-Digest: M2nVAaV/GUiGpw0qYAkv3jhplBM=

        Name: classes/PackageImportTest.class
        Author: Hesiod
        SHA-Digest: UQJuuqzHwYR6d9xjLxpuuKZ2rh8=

        Name: classes/GetImageTest.class
        Author: Ovid
        SHA-Digest: rOORt9Bb+uRg05IlC4+Hx2HkVvc=

        Name: images/javalogo52x88.gif
        Author: Pollack
        SHA-Digest: ygISCp2ogX4jA7ocxNLx52Z+PaY=

        Name: audio/spacemusic.au
        Author: Mozart
        SHA-Digest: 0catQiIinPAGeJ4Gmk60BcHQmWM=

        Name: GetAudioTest.java
        Author: Melville
        SHA-Digest: kMKQlZSWlvV3EbSR2XcrcAFyItI=

        Name: GetImageTest.java
        Author: Swift
        SHA-Digest: nBegdvZ+L6EwLg80KY9clDGKYxg=

        Name: PackageImportTest.java
        Author: Goethe
        SHA-Digest: /JELPE0twd0BiGutLh97dj4IZ2I=

        Name: SecurityTest.java
        Author: Joyce
        SHA-Digest: odQ3AQnCrecRIDSlWaR7v4ayx3M=

        Name: SecurityTestApplet.java
        Author: Anonymous
        SHA-Digest: Fb9tbUV9g5hfwG1EeBIowkQ7ZJE=




              asommere Alan Sommerer (Inactive)
              ajacobssunw Allan Jacobs (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: