JFileChooser not seeing network mounted files on 1.7.0_06 on Mac

Anthony Petrov anthony.petrov at oracle.com
Fri Aug 24 04:52:00 PDT 2012


On 8/24/2012 3:47 PM, Paul Taylor wrote:
>>> System.setProperty("apple.awt.fileDialogForDirectories", "true");
>>>
>>> but seems to have no effect, is this option still supported ?
>>
>> This is fixed for 7u8 under CR 7161437.
>>
> Thats good news , but I am in fact using 1.7.0_08-ea, is there later 
> version of 7u8 or am I using the fix wrong Im doing
> 
>         System.setProperty("apple.awt.fileDialogForDirectories", "true");
>         FileDialog chooser = new FileDialog(MainWindow.frame);
>         chooser.setMode(FileDialog.LOAD);
>         chooser.setVisible(true);
>         String folderSelected = chooser.getDirectory();
>         System.setProperty("apple.awt.fileDialogForDirectories", "false");
>         File folder = new File(folderSelected) ;
>         if(folder.exists() && folder.isDirectory())
>         {
>             //DO something
>         }
> 

The fix hasn't made it to the master repository yet. It is expected to 
appear in either 7u8b03 or 7u8b04. Maybe, in the worst case, in b05. 
Please check what build you're using with `java -version` and stay tuned.

--
best regards,
Anthony


More information about the macosx-port-dev mailing list