Return-Path: Delivered-To: apmail-incubator-harmony-dev-archive@www.apache.org Received: (qmail 21102 invoked from network); 10 Feb 2006 13:49:34 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 10 Feb 2006 13:49:33 -0000 Received: (qmail 28668 invoked by uid 500); 10 Feb 2006 13:49:23 -0000 Delivered-To: apmail-incubator-harmony-dev-archive@incubator.apache.org Received: (qmail 28614 invoked by uid 500); 10 Feb 2006 13:49:22 -0000 Mailing-List: contact harmony-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: harmony-dev@incubator.apache.org Delivered-To: mailing list harmony-dev@incubator.apache.org Received: (qmail 28603 invoked by uid 99); 10 Feb 2006 13:49:22 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [192.87.106.226] (HELO ajax.apache.org) (192.87.106.226) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 10 Feb 2006 05:49:19 -0800 Received: from ajax.apache.org (ajax.apache.org [127.0.0.1]) by ajax.apache.org (Postfix) with ESMTP id 1E443DE for ; Fri, 10 Feb 2006 14:48:58 +0100 (CET) Message-ID: <901798695.1139579338121.JavaMail.jira@ajax.apache.org> Date: Fri, 10 Feb 2006 14:48:58 +0100 (CET) From: "Vladimir Strigun (JIRA)" To: harmony-dev@incubator.apache.org Subject: [jira] Commented: (HARMONY-29) java.util.zip.ZipException while onening jar file on local machine In-Reply-To: <1360494618.1137166700471.JavaMail.jira@ajax.apache.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N [ http://issues.apache.org/jira/browse/HARMONY-29?page=comments#action_12365891 ] Vladimir Strigun commented on HARMONY-29: ----------------------------------------- another fix (using internal utils): 37a38 > import com.ibm.oti.util.Util; 235c236 < jar = new JarFile(new File(fileString), true, flags); --- > jar = new JarFile(new File(Util.decode(fileString, true)), true, flags); > java.util.zip.ZipException while onening jar file on local machine > ------------------------------------------------------------------ > > Key: HARMONY-29 > URL: http://issues.apache.org/jira/browse/HARMONY-29 > Project: Harmony > Type: Bug > Components: Classlib > Reporter: Vladimir Strigun > Assignee: Geir Magnusson Jr > > When I try to get entries from jar file I get java.util.zip.ZipException. Here is testcase for reproducing the issue: > import java.net.JarURLConnection; > import java.net.URL; > import java.util.Enumeration; > public class TestZipFile { > public static void main(String argv[]) throws Throwable { > final String urlStr = "jar:file:/C:/Documents%20and%20Settings/" + > "user/test.jar!/Test.class"; > JarURLConnection conn = (JarURLConnection) > new URL(urlStr).openConnection(); > Enumeration enum = conn.getJarFile().entries(); > System.out.println("PASS"); > } > } > On RI test passed, but with Harmony classlibs I get following exception: > java.util.zip.ZipException: Unable to open: C:\Documents%20and%20Settings\user\test.jar > at java.util.zip.ZipFile.openZip() > at java.util.zip.ZipFile.() > at java.util.jar.JarFile.() > at com.ibm.oti.net.www.protocol.jar.JarURLConnection.openJarFile() > at com.ibm.oti.net.www.protocol.jar.JarURLConnection.findJarFile() > at com.ibm.oti.net.www.protocol.jar.JarURLConnection.connect() > at com.ibm.oti.net.www.protocol.jar.JarURLConnection.getJarFile() > at TestZipFile.main(TestZipFile.java:9) -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira