Layout { public Manifest getManifest() throws IOException { Path root = getRoot(); String mfName = "META-INF/MANIFEST.MF"; if (isUberJar()) { if (isUnpackedUberJar()) { Path mani = root.resolve(mfName); InputStream in = new FileInputStream(mani.toFile()); return new Manifest(in); } else { try (JarFile jar = new JarFile(root.toFile())) { ZipEntry entry = jar.getEntry(mfName); if (entry != null) { InputStream in = jar.getInputStream(entry); return new Manifest(in); } } } } return null; } Layout(CodeSource codeSource); static Layout getInstance(); Path getRoot(); boolean isUberJar(); Manifest getManifest(); synchronized ClassLoader getBootstrapClassLoader();  }
@Test public void testGetManifest() throws Exception { Layout layout = Layout.getInstance(); System.err.println(layout.getManifest()); }