File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes IDEs, Version Control and other tools and the fly likes MANIFEST.MF Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Reply Bookmark "MANIFEST.MF" Watch "MANIFEST.MF" New topic
Author

MANIFEST.MF

ben oliver
Ranch Hand

Joined: Mar 28, 2006
Posts: 369
I imported a java project from someone. It contains a "META-INF/MANIFEST.MF" file already.

Now I am creating my own jar file for this project. When I use ant to create a jar for this project, should I copy this MANIFEST.MF that is already in my java project ? Or should I let jar utility create its own MANIFEST.MF ?

I just don't know how I can copy the existing MANIFEST.MF into the new jar ? It seems jar utility automatically creates one everytime you jar it, right ?
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 35252
    
    7
You do not necessarily need a manifest. Desktop apps have one in order to provide "double-clickability", but if the jar file contains a library for use by other code then there's probably no need.

And no, the jar tool does not automatically create a manifest.

See http://faq.javaranch.com/java/JarFiles for links to more information.


Android appsImageJ pluginsJava web charts
ben oliver
Ranch Hand

Joined: Mar 28, 2006
Posts: 369
Thanks. Currently in the eclipse project I imported, it has a "META-INF/MANIFEST.MF". So if I just want to use this existing one for my jar, I just need to copy this META-INF/MANIFEST.MF to "build" directory along with the compiled ".class" file, then jar everything under the "build", that's it. Since the jar utility in ant does not auto overwrite the MANIFEST it will be kept.

Does it sound OK ?
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: MANIFEST.MF
 
Similar Threads
In Eclipse, how to add log4j.properties to classpath ?
how do i place class file dynamically
How Do I Create This jar File
How to make jar file executeable ?
MANIFEST.MF Class-path