房天下 > 房天下问答 > 业主生活 > 其他
  • access数据库备份问题

    我从网上下了一用java写的源程序,里面有数据库备份的功能,可以当我运行时,提示java.ioException:系统找不指定的路径。主要代码如下void jButton1_actionPerformed(ActionEvent e) { File fBak = new File(".\\bak\\db.bak"); File fDb = new File(".\\data\\Family.mdb"); FileInputStream fin= null; FileOutputStream fout = null; try{ if(!fBak.exists()) fBak.createNewFile(); fin=new FileInputStream(fDb); fout = new FileOutputStream(fBak); int r; while((r = fin.read()) != -1){ fout.write((byte)r); } JOptionPane.showMessageDialog(this,"备份成功!","提示",JOptionPane.INFORMATION_MESSAGE); }catch(Exception ex) { JOptionPane.showMessageDialog(this,ex.toString(),"提示",JOptionPane.ERROR_MESSAGE); }finally { try{ if(fin!=null) fin.close(); if(fout!=null) fout.close(); } catch(Exception ex){} } } void jButton2_actionPerformed(ActionEvent e) { File fBak = new File(&quot

    提问者:chinadgj

    发布于2010-12-19

共1个回答
  • 小火柴丫丫 丨Lv 0
    路径有问题
    +1 2010-12-19 举报
热门人气推荐
免责声明:问答内容均来源于互联网用户,房天下对其内容不负责任,如有版权或其他问题可以联系房天下进行删除。