JDK-4146587 : No way to prevent jar from following symbolic links
  • Type: Enhancement
  • Component: tools
  • Sub-Component: jar
  • Affected Version: 1.1.6
  • Priority: P5
  • Status: Closed
  • Resolution: Not an Issue
  • OS: solaris_2.5.1
  • CPU: sparc
  • Submitted: 1998-06-08
  • Updated: 2002-05-17
  • Resolved: 2002-05-17
Related Reports
Relates :  
Description
jar always follows symbolic links and as far as I know there is
no option to prevent it from doing so. So if you have a symlink
in your filesystem like "lib -> .." you throw jar into an infinite
loop. When creating an archive on UNIX you almost never want to
follow symlinks.

By default tar does not follow symbolic links. Also zip provides a 
way to not follow symlinks (-y).

I consider this a bug not an RFE since it is such a glaring omission.

Comments
EVALUATION Unfortunately, there is no way to detect a symbolic link in Java so I am reclassifying this as an RFE. david.connelly@Eng 1998-06-23 Will not fix. Win32 does not even support symbolic link. Requiring to support this in java would not be clean and easy. ###@###.### 1998-07-10
23-06-1998