从相对文件名路径获取绝对文件名路径
import java.io.File; public class Main { /* 时 代 Java - nowjava.com 提 供 */ public void m() { File file = new File("filename.txt"); file = file.getAbsoluteFile(); // c:\temp\filename.txt file = new File("dir" + File.separatorChar + "filename.txt"); file = file.getAbsoluteFile(); // c:\temp\dir\filename.txt file = new File(".." + File.separatorChar + "filename.txt"); file = file.ge