United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
JDK-6550137 : java.util.zip package does not support unix symbolic links

Details
Type:
Bug
Submit Date:
2007-04-25
Status:
Open
Updated Date:
2010-04-02
Project Name:
JDK
Resolved Date:
Component:
core-libs
OS:
generic
Sub-Component:
java.util.jar
CPU:
generic
Priority:
P3
Resolution:
Unresolved
Affected Versions:
1.0
Targeted Versions:

Related Reports

Sub Tasks

Description
Impossible to detect symlink entries in zip files containing them.

symlinks on unix are common yet with Java it's impossible to detect them and create them appropriately, so any zip file with symlinks is not exploded properly.

This can also be seen using 'jar' to extract a zipfile containing symlinks:


[jhf@spirit]:z$> cd unzip; unzip /tmp/foo.zip; ls -l
Archive:  /tmp/foo.zip
 extracting: a                       
    linking: b                       -> a 
finishing deferred symbolic links:
  b                      -> a
total 8
-rw-r--r--   1 jhf      other          0 Apr 25 10:25 a
lrwxrwxrwx   1 jhf      other          1 Apr 25 10:28 b -> a

[jhf@spirit]:unzip$> cd ../jar; jar xf /tmp/foo.zip; ls -l
total 8
-rw-r--r--   1 jhf      other          0 Apr 25 10:25 a
-rw-r--r--   1 jhf      other          1 Apr 25 10:25 b

zip files with symlinks can be created using "zip -y".

                                    

Comments
EVALUATION

It should be possible to provide this using some of the New I/O APIs in JSR 203.
                                     
2007-04-26



Hardware and Software, Engineered to Work Together