62,621
社区成员
发帖
与我相关
我的任务
分享 button.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
Properties config=new Properties();//记录配置项
try {
config.load(new FileInputStream("integrate.properties"));
config.setProperty("password",text_5.getText());
FileOutputStream outputFile = new FileOutputStream("integrate.properties");
config.store(outputFile, "test");
outputFile.close();
} catch (Exception e1) {
// TODO 自动生成 catch 块
e1.printStackTrace();
}
Display.getCurrent().asyncExec(new Runnable(){
public void run() {
SqlFileExecutor sfe=new SqlFileExecutor(text_2);
try {
sfe.execute("data.sql");
} catch (Exception e) {
// TODO 自动生成 catch 块
e.printStackTrace();
}
}
});
}