Questions tagged [manifest.mf]

In software packaging, it is common to list the contents of a distribution in a manifest file

This file simply enumerates the files which are included in the distribution, either for processing by various packaging tools, or for human consumption.

The term is a loan from shipping, where a ship's manifest would list the crew or cargo of a vessel.

The manifest may optionally contain a cryptographic hash or checksum of each file. By creating a cryptographic signature for such a manifest file, the entire contents of the distribution package can be validated, as altering any of the files will invalidate the checksums in the manifest file.

The manifest files usually have .MF extension.

337 questions
152
votes
13 answers

Reading my own Jar's Manifest

I need to read the Manifest file, which delivered my class, but when I use: getClass().getClassLoader().getResources(...) I get the MANIFEST from the first .jar loaded into the Java Runtime. My app will be running from an applet or a webstart, so I…
Houtman
  • 2,819
  • 2
  • 24
  • 34
117
votes
2 answers

Use of the MANIFEST.MF file in Java

I noticed that JAR, WAR and EAR files have a MANIFEST.MF file under the META-INF folder. What is the use of the MANIFEST.MF file? What all things can be specified in this file?
Anand
  • 20,708
  • 48
  • 131
  • 198
108
votes
6 answers

How to read MANIFEST.MF file from JAR using Bash

I need to read MANIFEST.MF maven manifest file from "some.jar" using bash
Roman
  • 1,163
  • 3
  • 9
  • 5
52
votes
12 answers

file not found manifest.mf eclipse

I'm using the following configuration : Eclipse Indigo Maven 2 ClearCase (like SVN and CVS) and every time I want to run an application within eclipse a popup appears telling me that a Problem has occured : File not found :…
Adil
  • 4,503
  • 10
  • 46
  • 63
42
votes
2 answers

include external jar when running java -jar

From my readings, when you execute a command as follows: java -jar foo.jar Then the main classpath is ignored, and the classpath is taken from the manifest file. Further, the classpath declared on the command line is also ignored. So in: java…
rouble
  • 16,364
  • 16
  • 107
  • 102
40
votes
9 answers

reading MANIFEST.MF file from jar file using JAVA

Is there any way i can read the contents of a jar file. like i want to read the manifest file in order to find the creator of the jar file and version. Is there any way to achieve the same.
M.J.
  • 16,266
  • 28
  • 75
  • 97
27
votes
2 answers

manifest first OSGi build with gradle - migrating from ant to Gradle

Is there manifest first http://wiki.osgi.org/wiki/Tooling_Approaches gradle plugin for OSGi? Or how to do it with gradle? There's big old project for OSGi container with many project having complicated relation declared in MANIFEST.MF. The build is…
Paul Verest
  • 60,022
  • 51
  • 208
  • 332
25
votes
6 answers

MANIFEST.MF (The system cannot find the path specified)

I am trying to create the project as set out in the tutorial "http://crunchify.com/how-to-build-restful-service-with-java-using-jax-rs-and-jersey/". I have followed all the steps but I get thee POM error .... Description Resource Path Location…
chucknor
  • 837
  • 2
  • 18
  • 33
23
votes
8 answers

Netbeans manifest

Is it possible to add entries to the manifest.mf file of jars generated by netbeans? to build an osgi bundle for instance.
Maurice Perry
  • 32,610
  • 9
  • 70
  • 97
23
votes
1 answer

What is use of MANIFEST.MF in WAR/JAR/EAR?

I am aware of usage of MANIFEST file in a mobile application, but am not aware of usage of same in a Java Application. My guess say like, its being used to keep BUILD information only. Am I correct?? Is this Mandatory?If not, then what are the key…
Ashish Agarwal
  • 6,215
  • 12
  • 58
  • 91
22
votes
3 answers

JAR Manifest file - Difference between Specification and Implementation

I want to add versioning information (and possibly some other metadata about the jar) to a jar of a library I created. However, I am not sure what attribute to use. I found that the specification as well the documentation explain that there can be a…
Joachim Kurz
  • 2,875
  • 6
  • 23
  • 43
21
votes
9 answers

How do you create a MANIFEST.MF that's available when you're testing and running from a jar in production?

I've spent far too much time trying to figure this out. This should be the simplest thing and everyone who distributes Java applications in jars must have to deal with it. I just want to know the proper way to add versioning to my Java app so that…
user16216
  • 229
  • 1
  • 3
  • 4
21
votes
8 answers

How to read my META-INF/MANIFEST.MF file in a Spring Boot app?

I'm trying to read my META-INF/MANIFEST.MF file from my Spring Boot web app (contained in a jar file). I'm trying the following code: InputStream is = getClass().getResourceAsStream("/META-INF/MANIFEST.MF"); Properties prop = new…
Ricardo Memoria
  • 454
  • 1
  • 3
  • 14
21
votes
6 answers

"No Main Manifest Attribute" in ----.jar Netbeans

I recently just started toying around with Maven in java. Time comes to test my project, it works fine in the NetBeans window, running the main class found in App.java (com.MyCompany.App), but when I try to run it from a command line I get an…
A_Elric
  • 3,508
  • 13
  • 52
  • 85
20
votes
2 answers

How can I tell which signed jar is causing maven-shade-plugin to fail?

To run maven-shade-plugin, I have to use to method described here due to signed dependencies, as shown here: maven-shade-plugin package
jordanpg
  • 6,386
  • 4
  • 46
  • 70
1
2 3
22 23