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

need a way to determine "My Documents" directory on Windows

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Duplicate
    • Icon: P4 P4
    • None
    • 1.4.2
    • core-libs
    • x86
    • windows_xp



      Name: rmT116609 Date: 05/11/2004


      A DESCRIPTION OF THE REQUEST :
      I sincerely hope that I am missing something, but as far as I know, there is no reasonable way to determine the location of the user's "My Documents" directory when running on a Windows system.

      On every other platform, the "user.home" system property is a sensible, sane location in which to store documents. Under Windows, it is not. However, many Java programs, having been written on non-Windows platforms, store their documents in "user.home" by default.

      Further, even if a programmer is aware of this and tries to figure out the location of the "My Documents" on Windows, I am aware of no reasonable way to do it. The obvious solution is to provide a "user.documents" system property -- this could be the same as "user.home" on non-Windows platforms, but point the "My Documents" on Windows.

      JUSTIFICATION :
      Without this feature, there is no (sane) way to determine a reasonable default document location under Windows.


      CUSTOMER SUBMITTED WORKAROUND :
      Use ShellFolder to get access to it
      (Incident Review ID: 265050)
      ======================================================================

            martin Martin Buchholz
            rmandalasunw Ranjith Mandala (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: