Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8003399

JFileChooser gives wrong path to selected file when saving to Libraries folder on Windows 7

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 6u33, 7u6
    • Fix Version/s: 9
    • Component/s: client-libs
    • Environment:

      Windows 7, JDK 1.6 or 1.7

    • Subcomponent:
    • Resolved In Build:
      b68
    • OS:
      windows_7

      Backports

        Description

        Steps to reproduce:

        - Open plain JFileChooser e.g. like this:
                JFileChooser fc = new JFileChooser();
                if( JFileChooser.APPROVE_OPTION == fc.showSaveDialog( this ) ) {
                    File selFile = fc.getSelectedFile();
                    System.err.println( selFile.getAbsolutePath() );
                }

        - select 'Libraries' in file chooser's combo box
        - then double-click 'Pictures'
        - type any new file name, e.g. 'aaaaa.txt'

        The selected path provided by the file chooser will be something like:

        D:\temp\JavaApplication19\::{031E4825-7B94-4DC3-B131-E946B44C8DD5}\Pictures.library-ms\aaaaa.txt


        See also this NetBeans issue: http://netbeans.org/bugzilla/show_bug.cgi?id=219837

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  ssadetsky Semyon Sadetsky (Inactive)
                  Reporter:
                  saubrech Stanislav Aubrecht
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  8 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: