移动文件
/**n o w j a v a . c o m - 时代Java**/ import java.io.IOException; import java.nio.file.FileSystem; import java.nio.file.FileSystems; import java.nio.file.Files; import java.nio.file.Path; public class Main { public static void main(String[] args) { FileSystem fileSystem = FileSystems.getDefault(); Path sourcePath = fileSystem.getPath("file.log"); Path targetPath = fileSystem.getPath("file2.log"); System.out.println("Move from " + sourcePath.toAbsolutePath().toString() + " to " + targetPath.toAbsolutePath().toString()); try {