# Importing Java libraries into settings.gradle

**URL:** <https://discuss.gradle.org/t/importing-java-libraries-into-settings-gradle/21799>\
**Category:** Help/Discuss\
**Tags:** not-a-bug\
**Created:** [March 1, 2017, 9:20pm UTC](https://discuss.gradle.org/t/importing-java-libraries-into-settings-gradle/21799 "2017-03-01T21:20:51Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![AdamBJ](https://avatars.discourse-cdn.com/v4/letter/a/a6a055/32.png) [@AdamBJ](https://discuss.gradle.org/u/AdamBJ)\
**Post date:** [March 1, 2017, 9:20pm UTC](https://discuss.gradle.org/t/importing-java-libraries-into-settings-gradle/21799/1 "2017-03-01T21:20:51Z")

</div>

I have a multi-project build with an uncommon folder hierarchy. Rather than having all the subprojects contained within the root project, the subprojects are scattered throughout the file system. As a consequence, I’m overwriting the  
`project.projectDir` of many subprojects as suggested in this post: [How to include sub-projects in settings.gradle file?](https://discuss.gradle.org/t/how-to-include-sub-projects-in-settings-gradle-file/5096)

I’d like to use Java’s `Paths` library ([https://docs.oracle.com/javase/tutorial/essential/io/pathClass.html](https://docs.oracle.com/javase/tutorial/essential/io/pathClass.html)) to make it easier to work with paths. However, I’m unsure how/if I can important the `java.nio.file` library into my `settings.gradle` file. Simply `import java.nio.file` doesn’t seem to work.

---

<div class="post-metadata">

**Author:** ![AdamBJ](https://avatars.discourse-cdn.com/v4/letter/a/a6a055/32.png) [@AdamBJ](https://discuss.gradle.org/u/AdamBJ)\
**Post date:** [March 1, 2017, 9:28pm UTC](https://discuss.gradle.org/t/importing-java-libraries-into-settings-gradle/21799/2 "2017-03-01T21:28:33Z")

</div>

It seems I was trying to import something that doesn’t exist. Using `import java.nio.file.Paths` seems to work.
