JDK-8032220 : Files.createDirectories throws exception with confusing message for root directories that exist
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.nio
  • Affected Version: 9
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2014-01-18
  • Updated: 2014-07-29
  • Resolved: 2014-01-21
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 8 JDK 9
8u20Fixed 9 b02Fixed
Description
This issue came up on nio-discuss:
  http://mail.openjdk.java.net/pipermail/nio-discuss/2014-January/000710.html

On OS X it appears to be caused by the underlying mkdir failing with EISADIR and this not translated into a FileAlreadyExistsException.

On Windows it appears to be caused by the underlying CreateDIrectory failing with an access denied error.

It does not appear to be an issue on Linux.