用Eclipse做管理系统的用户登录出现问题,老是弹出对话框提示登录信息错误 5
publicvoidwidgetSelected(SelectionEvente){Stringsuser=text.getText();Stringpsw=text_1...
public void widgetSelected(SelectionEvent e) {
String suser=text.getText();
String psw=text_1.getText();
List<Object> params=new ArrayList<Object>();
params.add(suser);
params.add(psw);
String sql="select * from administor where suser='"+suser+"'and psw='"+psw+"'";
List<Tb_operator> list;
DBhelper db=new DBhelper();
try {
list=db.findAll(sql, params, Tb_operator.class);
if(list.size()>0){
Map<String,String> map=new HashMap<String ,String>();
if(button.getSelection()){
map.put("issave", "1");
map.put("suser", suser);
map.put("psw",psw );
RegistrationUtil rsu=new RegistrationUtil();
rsu.saveRegistration(map);
}else{
map.put("issave","0");
map.put("suser", " ");
map.put("psw", " ");
RegistrationUtil rsu=new RegistrationUtil();
rsu.saveRegistration(map);
}
shell.close();
manage op=new manage();
op.setUserName(suser);
op.open();
}else{
UiUtil.showMessage(shell, "登陆失败", "用户名或密码错误");
}
} catch (Exception e1) {
e1.printStackTrace();
UiUtil.showMessage(shell, "出错了", "登陆时出错了");
}}
});
以上是代码,错误提示为:java.io.FileNotFoundException: db.properties (系统找不到指定的文件。)请问怎么解决? 展开
String suser=text.getText();
String psw=text_1.getText();
List<Object> params=new ArrayList<Object>();
params.add(suser);
params.add(psw);
String sql="select * from administor where suser='"+suser+"'and psw='"+psw+"'";
List<Tb_operator> list;
DBhelper db=new DBhelper();
try {
list=db.findAll(sql, params, Tb_operator.class);
if(list.size()>0){
Map<String,String> map=new HashMap<String ,String>();
if(button.getSelection()){
map.put("issave", "1");
map.put("suser", suser);
map.put("psw",psw );
RegistrationUtil rsu=new RegistrationUtil();
rsu.saveRegistration(map);
}else{
map.put("issave","0");
map.put("suser", " ");
map.put("psw", " ");
RegistrationUtil rsu=new RegistrationUtil();
rsu.saveRegistration(map);
}
shell.close();
manage op=new manage();
op.setUserName(suser);
op.open();
}else{
UiUtil.showMessage(shell, "登陆失败", "用户名或密码错误");
}
} catch (Exception e1) {
e1.printStackTrace();
UiUtil.showMessage(shell, "出错了", "登陆时出错了");
}}
});
以上是代码,错误提示为:java.io.FileNotFoundException: db.properties (系统找不到指定的文件。)请问怎么解决? 展开
2个回答
2014-05-15
展开全部
差API,自己升级JDK
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
你又db.propertie 这个属性文件吗/ 配置数据库连接信息的
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询