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

JavaFileObject.toUri returns bogus URI (win)

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 7
    • 7
    • tools
    • b72
    • generic
    • generic
    • Verified

        The spec for File.toUri contains the following:

        >> For a given abstract pathname f, it is guaranteed that
        >> new File( f.toURI()).equals( f.getAbsoluteFile())


        On Windows, the result of f.toUri() is something like
        file://C/w/jjg/work/....
        When I try and use new File(f.toUri()) I get the following exception

        java.lang.IllegalArgumentException: URI has an authority component

        This is with JDK 1.7, on Windows XP SP2, using Cygwin.

              jjg Jonathan Gibbons
              jjg Jonathan Gibbons
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: