Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the purpose of Manifest file

Tags:

java

https://docs.oracle.com/javase/tutorial/deployment/jar/manifestindex.html

What does a manifest file do? What is the purpose of it?

Manifest-Version: 1.0

Name: java/math/BigDecimal.class
SHA1-Digest: TD1GZt8G11dXY2p4olSZPc5Rj64=
MD5-Digest: z6z8xPj2AW/Q9AkRSPF0cg==

Name: java/math/BigInteger.class
SHA1-Digest: oBmrvIkBnSxdNZzPh5iLyF0S+bE=
MD5-Digest: wFymhDKjNreNZ4AzDWWg1Q==

Does it update these classes in the jar automatically if there any changes in the server?

like image 785
John Cooper Avatar asked Jul 10 '12 08:07

John Cooper


People also ask

What are manifest files used for?

A MANIFEST file is an XML document that describes the manifest, or package contents, of a Windows software application. It is used by various Windows technologies for configuring and deploying software, including ClickOnce and the Common Language Runtime (CLR). MANIFEST files are often seen with the compound ".exe.

Are manifest files important?

The manifest file provides essential information about your app to the Android operating system, and Google Play store. The Android manifest file helps to declare the permissions that an app must have to access data from other apps.

What should be in a manifest file?

A manifest file in computing is a file containing metadata for a group of accompanying files that are part of a set or coherent unit. For example, the files of a computer program may have a manifest describing the name, version number, license and the constituent files of the program.

What is the use of manifest file in spring boot?

Choose a manifest file when deploying an app The new version of the Spring Boot Dashboard supports Cloud Foundry manifest files as a first-class citizen. This starts to show up when you deploy an application from within the Boot Dashboard to a Cloud Foundry target for the first time.


2 Answers

The manifest is a special file that can contain information about the files packaged in a JAR file. By tailoring this "meta" information that the manifest contains, you enable the JAR file to serve a variety of purposes.

Mainfest file is mainly known for contains the name of the class that holds the main function, among various classes in the package...

When you create a JAR file, it automatically receives a default manifest file. There can be only one manifest file in an archive, and it always has the pathname

META-INF/MANIFEST.MF
like image 119
Kumar Vivek Mitra Avatar answered Oct 04 '22 04:10

Kumar Vivek Mitra


What does a manifest file do? What is the purpose of it?

The purpose is to hold metadata about the JAR file and the classes that it contains. The metadata is used for a variety of things, including tracking the origin of the JAR, protecting against tampering, and providing the extra information needed for an executable JAR.

The link in your question is broken. Here are a couple of alternatives:

  • Working with Manifest Files: The Basics
  • JAR File Specification

Does it update these classes in the jar automatically if there any changes in the server?

No.

Those entries are part of a scheme for detecting tampering with JAR files; e.g. someone replacing those classes with modified versions. (The other parts of the scheme are a digital signature of the hashes, and stuff in the launcher that checks the signatures and hashes before launching.)

like image 20
Stephen C Avatar answered Oct 04 '22 05:10

Stephen C