title: Zip/Compress a Symbolic Link using Java
body: <p>I have a package that depends on symlinks with relative targets.  The package is generated by a Unix system for use by Unix systems.  I'd like to zip this package and preserve the symlinks as they are.</p>
  
  <p>Currently, whenever I zip up the symlink using Jakarta Commons Compress library, java.util.zip.* classes, etc., they follow the link and zip the target file instead.</p>
  
  <p>Do any of you know of a way to zip the files as I'd like?</p>
  
  <p><strong>Some Background/Notes</strong></p>
  
  <ul>
  <li>I do understand that symlinks are Unix-specific whereas Java and
  compression libraries alike try to be as platform-agnostic as
  possible.</li>
  <li>There has been much googling on this topic, but many of the solutions resort to using some form of command-line, which unfortunately, is not an option for me.</li>
  <li>I would like a way to target the reference file that defines the symlink, and compress that.  The only object I can seem to reference is the symlink itself, which ends up translating to the target file.</li>
  <li>The output must be a zip file.</li>
  </ul>