标签:sep alert void .sh stack 保存 XML show this
@FXML
private void savaconfig(ActionEvent event) {
try {
Properties prop = new Properties();
FileWriter fw = new FileWriter("conf" + File.separator + "config.properties");
BufferedWriter br = new BufferedWriter(fw);
String sqlmapPath = this.id_textFeild.getText();
prop.setProperty("SqlmapPath", sqlmapPath);
prop.store(br, "配置文件");
br.close();
new Alert(Alert.AlertType.NONE, "已保存到配置文件config.properties", new ButtonType[] { ButtonType.CLOSE }).show();
}
catch (Exception e) {
new Alert(Alert.AlertType.NONE, "未找到配置文件config.properties", new ButtonType[] { ButtonType.CLOSE }).show();
e.printStackTrace();
}
}
标签:sep alert void .sh stack 保存 XML show this
原文地址:http://www.cnblogs.com/SEC-fsq/p/6720437.html