在测试mysql的时候报错,我用的是mysql5.0.22,用的驱动包是5.0.8的,在测试的时候报错import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.DriverManager;public class Test{
public static void main(String[] args){
} static void test() throws Exception{
//注册驱动
DriverManager.registerDriver(new com.mysql.jdbc.Driver());
}
}在com.mysql下总是有红线,报错
com.mysql.cannot be resolved to a typeMultiple ers at this line
- com.mysql cannot be resolved to a type
- Occurrence of "mysql"注:mysql-connector-java-5.0.8.zip 包已经导入
import java.sql.ResultSet;
import java.sql.DriverManager;public class Test{
public static void main(String[] args){
} static void test() throws Exception{
//注册驱动
DriverManager.registerDriver(new com.mysql.jdbc.Driver());
}
}在com.mysql下总是有红线,报错
com.mysql.cannot be resolved to a typeMultiple ers at this line
- com.mysql cannot be resolved to a type
- Occurrence of "mysql"注:mysql-connector-java-5.0.8.zip 包已经导入
http://topic.csdn.net/u/20090917/01/1a6d531a-408f-43d6-8e0a-74b4d928bdcd.html