On Thu, 5 Jan 2023 21:38:08 GMT, Phil Race <p...@openjdk.org> wrote: > What do people mean by Control Panel ? Do you mean Windows (File) Explorer ? > If you do mean Control Panel I think I need a picture or two to show me how > that affects FileChooser. Is that lnk file format something that is "stable" > across Windows releases ?
I mean the classical Control Panel that's launched in Windows Explorer as opposed to the modern Settings app. A shortcut, `.lnk`, can point to any object in the Shell namespace (a COM object) not only to objects on file system. >From [the linked >email](https://mail.openjdk.org/pipermail/awt-dev/2019-November/015494.html), >I infer there's `The Internet` object (on a desktop? ) which is marked with >`ATTRIB_BROWSABLE` but not `ATTRIB_FOLDER`. That is the Windows (File) >Explorer can navigate to this object, yet JFileChooser can't because this >object is not a file system object. If I understand @mrserb's scenario where he reproduced the problem, one of the folders (Recent) contained a shortcut which has the same or similar properties: the File Explorer can navigate to the object to which the shortcut points, yet JFileChooser can't because it shows and navigates file system objects object. A `.lnk` object is stable across Windows releases, basically it's a serialised form of `IShellLink` interface. Yet the shell would fail to resolve the `.lnk` if the shell extension it points to is not installed. ------------- PR: https://git.openjdk.org/jdk/pull/11789