reading MANIFEST.MF file from jar file using JAVA

前端 未结 8 1343
情深已故
情深已故 2020-12-02 20:34

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 a

8条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-02 20:53

    I would suggest to make following:

    Package aPackage = MyClassName.class.getPackage();
    String implementationVersion = aPackage.getImplementationVersion();
    String implementationVendor = aPackage.getImplementationVendor();
    

    Where MyClassName can be any class from your application written by you.

提交回复
热议问题