⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 listing 10-7.java

📁 关于j2me的midlet事例源码, 能帮助你晋级!
💻 JAVA
字号:
Connection Db;
Properties props = new Properties (); 
try {
  FileInputStream propFileStream = 
                  new fileInputStream("DBProps.txt");
  props.load(propFileStream);
}
catch(IOException err) {
   System.err.print("Error loading propFile: ");
   System.err.println (err.getMessage()); 
   System.exit(1);
}
try {
   Class.forName( "sun.jdbc.odbc.JdbcOdbcDriver");
   Db = DriverManager.getConnection(url, props);
}
catch (ClassNotFoundException error) {
      System.err.println("Unable to load the JDBC/ODBC bridge." + 
             error);
      System.exit(2);
}
catch (SQLException error) {
      System.err.println("Cannot connect to the database." + error);
      System.exit(3);
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -