This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
import java.util.jar.Manifest;
import java.util.logging.Level;
import java.util.logging.Logger;
import java.util.regex.Pattern;
import java.util.zip.ZipEntry;
/**
}
static class JarSource extends Source {
private static final Pattern PLAIN_JAR_PROTOCOL;
static {
Pattern p = null;
String prop = System.getProperty("org.netbeans.JarClassLoader.PLAIN_JAR_PROTOCOL");
if (prop != null) {
p = Pattern.compile(prop);
PLAIN_JAR_PROTOCOL = p;
private String resPrefix;
private File file;
JarSource(File file) throws IOException {
super(file.toURL());
resPrefix = ResURLStreamHandler.RES_PROTO +":" + file.toURI() + "!/"; // NOI18N;
if (PLAIN_JAR_PROTOCOL != null && PLAIN_JAR_PROTOCOL.matcher(file.getAbsolutePath()).matches()) {
resPrefix = "jar:" + file.toURI() + "!/"; // NOI18N
} else {
resPrefix = ResURLStreamHandler.RES_PROTO + ":" + file.toURI() + "!/"; // NOI18N;
this.file = file;