What is the purpose of Manifest file

前端 未结 5 1253
没有蜡笔的小新
没有蜡笔的小新 2021-02-12 23:53

http://java.sun.com/developer/Books/javaprogramming/JAR/basics/manifest.html

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

Manifest-Version: 1         


        
5条回答
  •  鱼传尺愫
    2021-02-13 00:43

    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.)

提交回复
热议问题