@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();
}
}