1、必备软件:eclipse,mysql5,mysql-connector-java-5.0.4-bin.jar驱动程序
2.环境变量设置:将.jar的路径加载到ClassPath中。
3、驱动程序加载:
http://www.cnblogs.com/lyeoswu/p/3296760.html
3、测试驱动程序加载是否正确程序。
http://blog.csdn.net/cxwen78/article/details/6863696 数据库加载驱动程序到eclipse; 设置环境变量--将.jar加载到eclipse中,然后使用下面测试程序测试下能否使用。
package org.lxh.demo17.connectdemo;
public class CopyOfConnectionDemo01{
public static final String DBDRIVER="org.gjt.mm.mysql.Driver";
public static void main(String[]args){
try{
Class.forName(DBDRIVER);
System.out.print("success");
}catch(ClassNotFoundException e){
e.printStackTrace();
}
}
}