Results 1 to 5 of 5
  1. #1
    nhmllr's Avatar
    nhmllr is offline Member
    Join Date
    Aug 2011
    Posts
    51
    Rep Power
    0

    Default Simple Question about Manifest Files

    When I make an executable JAR in eclipse, how can I edit my Manifest file before I package it? All the tutorials I have found seem outdated.

    Thanks

  2. #2
    SurfMan's Avatar
    SurfMan is offline Godlike
    Join Date
    Nov 2012
    Location
    The Netherlands
    Posts
    947
    Rep Power
    2

    Default Re: Simple Question about Manifest Files

    I am not an Eclipse user, but that doesn't seem part of the problem. If you don't *have* a MANIFEST.MF, Eclipse will probably generate one. So if you need to add stuff to your manifest, create your own MANIFEST.MF and let Eclipse include *your* file instead of generating its own.
    "It's not fixed until you stop calling the problem weird and you understand what was wrong." - gimbal2 2013

  3. #3
    gimbal2 is offline Just a guy
    Join Date
    Jun 2013
    Location
    Netherlands
    Posts
    4,030
    Rep Power
    6

    Default Re: Simple Question about Manifest Files

    A possibility is to use ANT or Maven to manage your project (which you can also integrate into an Eclipse project); then you have 100% control over what is put in the jar and what is not, without being tied down to a specific IDE either. But you'd first have to learn either technology of course, which is not an overnight thing to do.

    As for Eclipse itself: start it up. See that "help" menu item? Try looking there. Reading the manual is not a thing of this century I know, but it is still a valid option when tutorials and youtube videos fail you. Open "help contents", search "manifest", wait for it to index the help for a couple of seconds and then notice the "defining the jar's manifest" search result.

    Aaaaah in-line help, a thing of the past and still so much better than the internet.
    "Syntactic sugar causes cancer of the semicolon." -- Alan Perlis

  4. #4
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,528
    Blog Entries
    7
    Rep Power
    20

    Default Re: Simple Question about Manifest Files

    Also, by just using Eclipse, you can have complete control over what is stored in the .jar file: right click your project; select Export ..; select JAR file; tick what you want to export; select Next> twice and fill in the name of the file you want to use for your MANIFEST.MF entry; voila.

    kind regards,

    Jos
    cenosillicaphobia: the fear for an empty beer glass

  5. #5
    nhmllr's Avatar
    nhmllr is offline Member
    Join Date
    Aug 2011
    Posts
    51
    Rep Power
    0

Similar Threads

  1. "header" of jsp files - simple question
    By avallach in forum JavaServer Pages (JSP) and JSTL
    Replies: 1
    Last Post: 07-23-2014, 09:08 AM
  2. Manifest from eclipse
    By JavaJimme in forum Eclipse
    Replies: 1
    Last Post: 05-22-2013, 01:50 PM
  3. Problem with Manifest file
    By Wnt2bsleepin in forum New To Java
    Replies: 3
    Last Post: 01-11-2013, 08:49 PM
  4. manifest file problem
    By afraidofdark in forum Advanced Java
    Replies: 5
    Last Post: 03-27-2010, 12:58 PM
  5. Jar File Manifest
    By hitmen in forum New To Java
    Replies: 6
    Last Post: 03-11-2009, 04:08 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •