package myJavaPrograms;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
public class AccessDBFiles {
public static void main(String[] args) throws SQLException {
Connection conn=DriverManager.getConnection(
"jdbc:ucanaccess://C:\\TESTFILE\\Database11.accdb");
Statement s = conn.createStatement();
ResultSet rs = s.executeQuery("SELECT * FROM myTable");
while (rs.next()) {
System.out.println(rs.getString(1));
}
}
我在线程 main 中收到异常作为线程“main”中的异常 java.lang.NoClassDefFoundError: org/apache/commons/lang/builder/CompareToBuilder
尚方宝剑之说
慕森王
相关分类