• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Rob Spoor
  • Junilu Lacar
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Carey Brown
Bartenders:

jar and MANIFEST.MF

 
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have a folder that contains all the classes and META-INF. Here is the subfolders

com (includes its subfolders that contain .class files)
META-INF/MANIFEST.MF

I used ant

<jar jarfile="myapp.jar"
basedir="."/>

to create a "myapp.jar" file. The jar was successfully generated. However, when I do

"jar -xvf myapp.jar" to unpack it, I saw the META-INF/ folder and its MANIFEST.MF fiel. The MANIFEST.MF is different from the original MANIFEST.MF I used for packing.

Do you know why and how I can ensure the MANIFESTY.MF is not changed ?
 
Rancher
Posts: 43045
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The proper way to add a manifest is not to have a file in a META-INF directory, but to specify the file in a manifest attribute. The file can be anywhere and be named anything; Ant will package it properly.

Even better, you can keep the meta information in the build file (if you want):
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic