日期:2014-05-20 浏览次数:21006 次
File f=new File("xxxx"); f.getAbsolutePath();
------解决方案--------------------
File f=new File("xxxx");
String path=f.getAbsolutePath();
try {
FileWriter fw =new FileWriter("C:\\filename");
fw.append(path+'\n');
fw.flush();
fw.close();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}