The new ExtendedFileChooser instance creates the dialog for selection. The method #showOpenDialog() opens the dialog and returns the state of the ExtendedFileChooser. If an error occurs while determining canonical path a new dialog with detailed error information comes up.

All relevant lines are highlighted. Press the "Run..." button to start the example.