reading MANIFEST.MF file from jar file using JAVA

前端 未结 8 1301
情深已故
情深已故 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条回答
  •  萌比男神i
    2020-12-02 20:49

    Next code should help:

    JarInputStream jarStream = new JarInputStream(stream);
    Manifest mf = jarStream.getManifest();
    

    Exception handling is left for you :)

提交回复
热议问题