编程知识 cdmana.com

Maven ~ for MANIFEST.MF File add content

MANIFEST.MF

open Java Of JAR File we can often see that there is a META-INF Catalog , There will be some files in this directory , There must be one MANIFEST.MF, This document describes the Jar A lot of information about the file , More on this below MANIFEST.MF The content of the document .

Public content

  1. Manifest-Version Used to define manifest Version of a file , for example :Manifest-Version: 1.0
  2. Created-By Declare the producer of the file , In general, this attribute is created by jar Command line tool generated , for example :Created-By: Apache Ant 1.5.1
  3. Signature-Version Definition jar Signed version of the document
  4. Class-Path The application or class loader uses this value to build the internal class search path
  5. Main-Class Definition jar File entry class , This class must be an executable class , Once the attribute is defined, it can be passed through java -jar x.jar To run the jar file .

javaagent Parameter properties

  1. Premain-Class: com.lind.hot.deploy.DemoJavaAgent It is equivalent to , When we put this jar treat as -javaagent Parameter to register the current class loader , That is, if you want to be a javaagent package , You need to add this property

DemoJavaAgent Content

Be careful :javaagent The implementation of is in the current project main The advance of methods .........

版权声明
本文为[Program ape Owen]所创,转载请带上原文链接,感谢
https://cdmana.com/2020/12/20201224094617747z.html

Scroll to Top