-
Enhancement
-
Resolution: Fixed
-
P4
-
1.4.0, 1.4.2, 1.4.2_03, 5.0
-
None
-
b64
-
generic, x86, sparc
-
generic, solaris_9, windows_xp
When one invokes java with a wrong file name like this:
$ java -jar nosuchfile.jar
You get:
java.util.zip.ZipException: The system cannot find the file specified
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.<init>(ZipFile.java:112)
at java.util.jar.JarFile.<init>(JarFile.java:127)
at java.util.jar.JarFile.<init>(JarFile.java:65)
This also happens with programatic invocation of new JarFile(...);
But as you see it doesn't actually print the file name, which makes the debugging unnecessarily hard.
###@###.### 2004-04-15
$ java -jar nosuchfile.jar
You get:
java.util.zip.ZipException: The system cannot find the file specified
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.<init>(ZipFile.java:112)
at java.util.jar.JarFile.<init>(JarFile.java:127)
at java.util.jar.JarFile.<init>(JarFile.java:65)
This also happens with programatic invocation of new JarFile(...);
But as you see it doesn't actually print the file name, which makes the debugging unnecessarily hard.
###@###.### 2004-04-15
- duplicates
-
JDK-6290451 new Zipfile() should throw FileNotFoundException when appropriate
- Closed
-
JDK-6359688 Zip API classes do not report name of file when it cannot be opened
- Closed
-
JDK-4897356 Include file name when ZipFile.open throws a ZipException for No such file
- Closed
- relates to
-
JDK-5105554 RFE: More specific error message when a jar or zip is corrupt
- Open
-
JDK-4731870 ZipFile causes an exception in native code without informing user of which file.
- Closed