创建相对于当前文件夹的路径
import java.net.URI; import java.nio.file.FileSystems; /** 来自 时代Java**/ import java.nio.file.Path; import java.nio.file.Paths; public class Main { public static void main(String[] args) { //define a path relative to root, C:/, D:/ etc Path path06 = Paths.get("folder1/folder2/folder3/test.txt"); Path path07 = Paths.get("folder1", "folder2/folder3/test.txt");/**nowjava.com - 时代Java**/ Path path08 = FileSystems.getDefault().getPath("folder1/folder2/folder4",