| 
 Duplicate :   
 | 
|
| 
 Duplicate :   
 | 
|
| 
 Duplicate :   
 | 
|
| 
 Relates :   
 | 
The changes for
 6280693: Mmap the whole jar files takes too much perceived footprint
have caused failures on Solaris when an interrupted thread uses the java.util.zip API.
The following program:
---------------------------------------------------------------
import java.util.zip.*;
public class InterruptibleZip {
    private static String rtJar() {
	String bcp = System.getProperty("sun.boot.class.path");
	for (String jar : bcp.split("[;:]"))
	    if (jar.endsWith("rt.jar"))
		return jar;
	throw new Error("Can't find rt.jar");
    }
    public static void main(String[] args) throws Exception {
	ZipFile zf = new ZipFile(rtJar());
	Thread.currentThread().interrupt();
	ZipEntry ze = zf.getEntry("java/lang/Object.class");
	System.out.println("interrupted="+Thread.interrupted());
	System.out.println(ze.getName());
    }
}
---------------------------------------------------------------
results in 
...b45/binaries/solaris-sparc/jre/lib/rt.jar: error reading zip file
Exception in thread "main" java.lang.NoClassDefFoundError: java/util/zip/ZipEntry
  |