Eclipse里运行时,将mysql-connector-java-x.x.x-bin.jar添加到外部JAR,具体操作是:在工程目录右键->Build Path->Configure Build Path->Add External JARs
Linux平台下,用JAR包运行程序时,将mysql-connector-java-x.x.x-bin.jar放到java安装目录下的jre\lib\ext
Eclipse里运行时,将mysql-connector-java-x.x.x-bin.jar添加到外部JAR,具体操作是:在工程目录右键->Build Path->Configure Build Path->Add External JARs
Linux平台下,用JAR包运行程序时,将mysql-connector-java-x.x.x-bin.jar放到java安装目录下的jre\lib\ext