转载网址:http://blog.sina.com.cn/s/blog_5edcfe6a0100iogn.html
/**
* 去除文只读隐藏属性
* @param absolutePath String
*/
public static void clearReadonly(String absolutePath) {
try {
Runtime.getRuntime().exec("cmd /c attrib " + absolutePath + " -r -a -s -h");
System.out.println("文件: " + absolutePath + " 已去除只读属性!");
} catch (IOException e) {
e.printStackTrace();
}
}