Java parser for Windows shortcut (.lnk) created by cygwin

795 Views Asked by At

Following a previous discussion on lnk files parsing in java ( Windows shortcut (.lnk) parser in Java? ).

I've tested all solutions proposed. But no one works with my lnk files created by cygwin, when I untar an archive containing sym links created on a linux box. I got a java.lang.ArrayIndexOutOfBoundsException in getNullDelimitedString() method.
It seems that cygwin creates special lnk files with specific headers.

Does anyone knows how to have a java lnk parser working with this kind of sym links ?

1

There are 1 best solutions below

0
On

Symlink .lnk files created by Cygwin are different from Windows-created .lnk files.

See accepted response for Accessing a cygwin symlink from windows

By default, Cygwin does not create symlinks as .lnk files, but there's an option to do that, see the section called “The CYGWIN environment variable”. These symlink .lnk files are compatible with Windows-created .lnk files, but they are still different. They do not include much of the information that is available in a standard Microsoft shortcut, such as the working directory, an icon, etc.