Java Create Parent and Sub Directories using Files.createDirectories() In this Java NIO tutorial we learn how to create parent and sub directories of a file path in Java application using the Files.createDirectories() method.