//根目录 String rootDirectory = System.getProperty("user.dir"); 如果读取文件发现读取路径怎么都不对,可以尝试先查看根目录,然后拼接根目录+文件路径