LargeJarEntry.java revision 0
3380N/A * Copyright 2006 Sun Microsystems, Inc. All Rights Reserved. 3380N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3380N/A * This code is free software; you can redistribute it and/or modify it 3380N/A * under the terms of the GNU General Public License version 2 only, as 3380N/A * published by the Free Software Foundation. 3380N/A * This code is distributed in the hope that it will be useful, but WITHOUT 3380N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 3380N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 3380N/A * version 2 for more details (a copy is included in the LICENSE file that 3380N/A * You should have received a copy of the GNU General Public License version 3380N/A * 2 along with this work; if not, write to the Free Software Foundation, 3380N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 3380N/A * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, 3380N/A * CA 95054 USA or visit www.sun.com if you need additional information or 3380N/A * @summary Make sure jar files with large entries (more than max heap size) // Set java.io.tmpdir to the current working dir (see 6474350) // first, create jar file with 8M uncompressed entry // note, we set the max heap size to 8M in @run tag above byte[]
bytes =
new byte[
1000000];
for (
int i=
0; i<
8; i++) {
for (
int i=
0; i<
8; i++) {
throw new Exception(
"Test failed with OutOfMemoryError",
err);