在路径类型之间转换
import java.io.IOException; /*来自 时代Java - N o w J a v a . c o m*/ import java.nio.file.LinkOption; import java.nio.file.Path; import java.nio.file.Paths; public class Main { public static void main(String[] args) { try { Path path; path = Paths.get("users.txt"); System.out.println("URI path: " + path.toUri()); System.out.println("Absolute path: " + path.toAbsolutePath()); System.out.println("Real path: " + p