public static void main(String[] args) throws Exception{
File file = new File ("C:/Users/Administrator/Desktop/xxx.properties");
Properties properties = new Properties() ;
FileInputStream fis = new FileInputStream(file) ;
properties.load(fis);
fis.close(); // 需要将檔案流進行關閉,不然後續重命名失敗
String address = (String)properties.get("address");
File dest = new File(file.getParent()+File.separator+address+".properties");
System.out.println(dest.getAbsolutePath());
System.out.println(file.renameTo(dest) );
}