Can values defined in MANIFEST.MF be accessed programmatically?

后端 未结 5 2080
暖寄归人
暖寄归人 2020-11-30 12:49

Can I access the values defined in a java manifest from code?

5条回答
  •  孤城傲影
    2020-11-30 12:56

    Try com.jcabi.manifests.Manifests utility class from jcabi-manifests. Using this class you can read all available MANIFEST.MF files with one liner:

    String name = Manifests.read("Foo-Name");
    

    Also, see this article: http://www.yegor256.com/2014/07/03/how-to-read-manifest-mf.html

提交回复
热议问题