Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
How to read own manifest file and get version number
URLClassLoader cl = (URLClassLoader) App.class.getClassLoader();
URL url = cl.findResource("META-INF/MANIFEST.MF");
Manifest manifest = new Manifest(url.openStream());
Attributes attr = manifest.getMainAttributes());
System.out.println(manifest.getMainAttributes().getValue("Implementation-Title"));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.