Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试使用 MSSQL JDBC 驱动程序来创建一个简单的映射器。
但由于某种原因,它说该jdbc包不存在,com.microsoft.sqlserver但正如您在图片中进一步看到的那样,我可以很好地导入整个驱动程序。
jdbc
com.microsoft.sqlserver
我以前遇到过这个问题,但我忘记了如何解决它。
我该如何解决?
编辑只是不要像我这样的白痴,string下次记得包括一个而不是一个类。
string
Class.forname 将字符串作为参数。用“.
代码应如下所示:
Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");