测试MySQL驱动的安装
2007-12-23 12:35:31 来源:WEB开发网核心提示:public class TestJDBCDriverInstallation_MySQL {public static void main(String[] args) {System.out.PRintln("TestJDBCDriverInstallation_MySQL begin");tr
public class TestJDBCDriverInstallation_MySQL {
public static void main(String[] args) {
System.out.PRintln("TestJDBCDriverInstallation_MySQL begin");
try {
String className = "org.gjt.mm.mysql.Driver";
Class driverObject = Class.forName(className);
System.out.println("driverObject=" + driverObject);
System.out.println("your installation of JDBC Driver OK.");
} catch (Exception e) {
// your installation of JDBC Driver Failed
System.out.println("Failed: JDBC Driver Error: " + e.getMessage());
}
System.out.println("TestJDBCDriverInstallation_MySQL end");
}
}
public static void main(String[] args) {
System.out.PRintln("TestJDBCDriverInstallation_MySQL begin");
try {
String className = "org.gjt.mm.mysql.Driver";
Class driverObject = Class.forName(className);
System.out.println("driverObject=" + driverObject);
System.out.println("your installation of JDBC Driver OK.");
} catch (Exception e) {
// your installation of JDBC Driver Failed
System.out.println("Failed: JDBC Driver Error: " + e.getMessage());
}
System.out.println("TestJDBCDriverInstallation_MySQL end");
}
}
(出处:http://www.cncms.com)
[]
- ››MySql数据库插入式的多存储引擎机制
- ››MySQL和PDO测试对比
- ››MySQL大表中重复字段的查询效率方法
- ››MySQL中BLOB字段类型介绍
- ››mysql 数据库查询随机数量条目的效率问题及解决办...
- ››MySQL中两种索引Hash与B-Tree的区别
- ››MySql存储过程 带参数处理方式
- ››MySQL数据表在phpmyadmin中的强制修复
- ››MySQL 5 乱码问题处理办法
- ››mysql sql语法错误 1149
- ››MySQL 1040 错误 Too many connections
- ››MySQL client ran out of memory(2008)
更多精彩
赞助商链接