How to set version to jar?

Discussion in 'Java' started by Muhammed, Apr 20, 2010.

  1. Muhammed

    Muhammed Guest

    Hi i am creating jar file using export menu of eclipse.Could any one
    tell me how to set the version to jar?


    Nasir
    Muhammed, Apr 20, 2010
    #1
    1. Advertising

  2. On Apr 20, 4:11 pm, Muhammed <> wrote:
    > ..Could any one
    > tell me how to set the version to jar?


    The manifest file of a Jar can contain attributes
    like version.

    Ant e.g.
    <jar destfile="${build}/jar/iset.jar" index='true' update='true'>

    <fileset dir="${build}/share">

    <include name="org/pscode/iset/*.class" />

    </fileset>
    <manifest>

    <attribute name="Main-Class"
    value="org.pscode.iset.ImageSequenceTitler"/>
    <section name="org/pscode/iset/">

    <attribute name="Implementation-Title" value="ISe-T - Image
    Sequence Titler"/>

    <attribute name="Implementation-Vendor" value="${vendor}"/>

    <attribute name="Implementation-Vendor-Id" value="org.pscode"/>

    <attribute name="Implementation-Version" value="${now}"/>

    </section>

    </manifest>

    </jar>

    --
    Andrew T.
    pscode.org
    Andrew Thompson, Apr 20, 2010
    #2
    1. Advertising

  3. Muhammed

    Java coder Guest

    Muhammed a écrit :
    > Hi i am creating jar file using export menu of eclipse.Could any one
    > tell me how to set the version to jar?
    >


    You have to use your own MANIFEST.MF file and include it in the export
    wizard.
    Java coder, Apr 23, 2010
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Arnold Peters
    Replies:
    0
    Views:
    551
    Arnold Peters
    Jan 5, 2005
  2. muttley
    Replies:
    0
    Views:
    2,687
    muttley
    Oct 20, 2005
  3. cyberco
    Replies:
    4
    Views:
    3,722
    Roedy Green
    Feb 14, 2006
  4. V Green
    Replies:
    0
    Views:
    823
    V Green
    Feb 5, 2008
  5. PA Bear [MS MVP]
    Replies:
    0
    Views:
    929
    PA Bear [MS MVP]
    Feb 5, 2008
Loading...

Share This Page