R
rog
Hi, I am having problems with adding new files (via winzip/winwar etc)
to JAR files that have been opened and saved using Archive::Zip - EG:
use strict;
use Archive::Zip;
my $testfile = 'ZipTest';
open (FH,">$testfile.java") || die "Error: $!\n";
print FH <<EOF;
public class ZipTest {
public static void main (String [] args) {
System.out.println("This is a test");
}
}
EOF
close FH;
unlink "$testfile.jar";
print `javac $testfile.java`;
print `jar cf ZipTest.jar $testfile.class`;
my $zip = Archive::Zip->new("$testfile.jar");
$zip->overwrite(); # this corrupts jar file somehow as Windows
# Zip tools can read the archive but cant add files to it
Any ideas would be appreciated. I'm using ActivePerl v5.8.3 with
Archive::Zip v1.82 and Java v1.4.2
Many thanks
Roger
to JAR files that have been opened and saved using Archive::Zip - EG:
use strict;
use Archive::Zip;
my $testfile = 'ZipTest';
open (FH,">$testfile.java") || die "Error: $!\n";
print FH <<EOF;
public class ZipTest {
public static void main (String [] args) {
System.out.println("This is a test");
}
}
EOF
close FH;
unlink "$testfile.jar";
print `javac $testfile.java`;
print `jar cf ZipTest.jar $testfile.class`;
my $zip = Archive::Zip->new("$testfile.jar");
$zip->overwrite(); # this corrupts jar file somehow as Windows
# Zip tools can read the archive but cant add files to it
Any ideas would be appreciated. I'm using ActivePerl v5.8.3 with
Archive::Zip v1.82 and Java v1.4.2
Many thanks
Roger