9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 */
23
24 /**
25 * @test
26 * @bug 6405538 6474350
27 * @summary Make sure jar files with large entries (more than max heap size)
28 * can be signed
29 * @run main/othervm -Xmx8M LargeJarEntry
30 * @author Sean Mullan
31 */
32
33 import java.io.File;
34 import java.io.FileOutputStream;
35 import java.util.jar.JarEntry;
36 import java.util.jar.JarOutputStream;
37 import java.util.zip.CRC32;
38
39 public class LargeJarEntry {
40
41 public static void main(String[] args) throws Exception {
42
43 String srcDir = System.getProperty("test.src", ".");
44 String keystore = srcDir + "/JarSigning.keystore";
45 String jarName = "largeJarEntry.jar";
46
47 // Set java.io.tmpdir to the current working dir (see 6474350)
48 System.setProperty("java.io.tmpdir", System.getProperty("user.dir"));
|
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 */
23
24 /**
25 * @test
26 * @bug 6405538 6474350
27 * @summary Make sure jar files with large entries (more than max heap size)
28 * can be signed
29 * @modules jdk.jartool/sun.security.tools.jarsigner
30 * @run main/othervm -Xmx8M LargeJarEntry
31 * @author Sean Mullan
32 */
33
34 import java.io.File;
35 import java.io.FileOutputStream;
36 import java.util.jar.JarEntry;
37 import java.util.jar.JarOutputStream;
38 import java.util.zip.CRC32;
39
40 public class LargeJarEntry {
41
42 public static void main(String[] args) throws Exception {
43
44 String srcDir = System.getProperty("test.src", ".");
45 String keystore = srcDir + "/JarSigning.keystore";
46 String jarName = "largeJarEntry.jar";
47
48 // Set java.io.tmpdir to the current working dir (see 6474350)
49 System.setProperty("java.io.tmpdir", System.getProperty("user.dir"));
|