Can I access the values defined in a java manifest from code?
Many of the values in the MANIFEST.MF can be accessed programmatically without having to find and/or open the jar file itself.
The class java.lang.Package provides access to the ImplementationTitle, ImplementationVendor, ImplementationVersion, SpecificationTitle, SpecificationVendor and the SpecificationVersion.
java.lang.Package
ImplementationTitle
ImplementationVendor
ImplementationVersion
SpecificationTitle
SpecificationVendor
SpecificationVersion
Information about signed classes can be found using the CodeSource class, which can be retrieved via Class.getProtectionDomain().getCodeSource()
CodeSource
Class
.getProtectionDomain()
.getCodeSource()
1.4m articles
1.4m replys
5 comments
56.9k users