/** Returns the code source. */ public CodeSource getCodeSource(String path) { try { Path jarPath = _jarPath.lookup(path); Certificate[] certificates = jarPath.getCertificates(); URL url = new URL(_jarPath.getContainer().getURL()); return new CodeSource(url, certificates); } catch (Exception e) { log.log(Level.WARNING, e.toString(), e); return null; } }
/** Validates the jar. */ public void validate() throws ConfigException { loadManifest(); if (_manifest != null) validateManifest(_jarPath.getContainer().getURL(), _manifest); }