在eclipse所建工程的顶层文件夹中右键 “bulid path”-->“add External Archives” 找到 mysql-connector-java-5.1.20-bin.jar 导入便可解决问题