62,614
社区成员
发帖
与我相关
我的任务
分享
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();
}
}
});
}
new Thread(new Runnable() {
public void run() {
while (没建完){
建表;
shlDms.getDisplay().asyncExec(new Runnable(){
public void run() {
打印xx表创建成功;
}
});
next;
}
}
}).start();
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();
}
Runnable wie = new Runnable() {
public void run() {
// TODO 自动生成方法存根
new Thread(new Runnable() {
public void run() {
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();
}
}
});
}
}).start();
}
};
BusyIndicator.showWhile(Display.getCurrent(), wie);
}
Runnable wie = new Runnable() {
@Override
public void run() {
new Thread(new Runnable() {
@Override
public void run() {
//Display.getCurrent()...放在这里
}
}).start();
}
};
BusyIndicator.showWhile(Display.getCurrent(), wie);