It's good I found something. So, in fact, the goal of the game was to find the path virtual "Neighborhood Network" run by windows to add as fileSystemView the root directory of JFileChooser. For this, I use the java class ShellFolder.
This is the piece of code:
Code:
/ / Get all the special folders in Windows
File [] files = (File []) ShellFolder.get ( "fileChooserComboBoxFolders");
File root = null;
for (int i = 0; i <files.length i + +) (
/ / = NETWORK_NEIGHBOURHOOD ":: (208D2C60-3AEA-1069-A2D7-08002B30309D)": the value of the directory in the registry
if (files [i]. getName (). equals (NETWORK_NEIGHBOURHOOD))
(
root = files [i];
break;
)
)
And then this just creates a JFileChooser with this file as root and you have a FileChooser not allowing you to access the network and the like network neighborhood.
Bookmarks