62,614
社区成员
发帖
与我相关
我的任务
分享
import java.io.IOException;
public class AddAttrib {
public static void main(String[] args){
try {
String cmd = "attrib +r f:\\test.txt";
Runtime.getRuntime().exec("cmd.exe /c start "+cmd);
} catch (IOException e) {
e.printStackTrace();
}
}
}