简体   繁体   English

Java 9的JDBC和MS SQL Server驱动程序

[英]JDBC and MS SQL Server Driver for Java 9

So, I am trying to set everything up to use MS SQL Server 2017 from IntelliJ IDEA, and so far I've been able to connect the IDE to the Databases (Gotta love DataGrip), I'm able to see the tables and everything: 因此,我正在尝试设置所有内容以使用IntelliJ IDEA的MS SQL Server 2017,到目前为止,我已经能够将IDE连接到数据库(一定要爱DataGrip),我可以看到表格和所有内容:

IDE

However, Microsoft hasn't developed a suitable Driver that supports Java 9, other than this . 然而,微软并没有开发出支持Java 9合适的驱动程序,比其他 The thing is, I have no idea how to even try to test what they are working on in that GitHub link; 问题是,我什至不知道该如何尝试在GitHub链接中测试他们正在做什么。 I tried to replicate what you would do to install a Driver for older Java versions (For example, Driver 6.2), but to no avail. 我试图复制您要为较旧的Java版本安装驱动程序(例如,Driver 6.2)的操作,但无济于事。

It isn't the Data source config, since if it was that, I wouldn't even be able to see the Employee DB, nor all it's contents. 这不是数据源配置,因为如果那样的话,我什至无法看到Employee DB,也看不到所有内容。 Also, the 'Pepe' table name it's just for testing purposes. 另外,“ Pepe”表名称仅用于测试目的。

What I'm asking for, is someone who can tell me where or what to do with the .jar files that contain said still-in-development driver, so I can make queries with the JDBC. 我要的是一个可以告诉我如何处理包含所说的仍在开发中的驱动程序的.jar文件的人,因此我可以使用JDBC进行查询。

The file that Microsoft offered to download and test contains this structure: Microsoft提供的下载和测试文件包含以下结构:

target.zip
|
|
|--mssql-jdbc-6.3.6-SNAPSHOT.jre8-preview.jar (For Java 8, I guess)
|--mssql-jdbc-6.3.6-SNAPSHOT.jre9-preview.jar (For Java 9, I guess)

Thanks for any help. 谢谢你的帮助。

Well, it appears that it was as easy as moving the .jar file to the libraries used by the project. 好吧,这似乎很简单,就像将.jar文件移动到项目所使用的库中一样。 Since I'm using IntelliJ, all I had to do is follow this perfect guide , select the .jar from Microsoft and works perfectly! 由于我使用的是IntelliJ,因此我所要做的就是遵循这份完善的指南 ,从Microsoft选择.jar正常运行!

To anyone with similar problems, just download the necessary Driver, move the .jar to the libraries used by your project however you do it with a different IDE, and you're ready. 对于有类似问题的任何人,只需下载必要的驱动程序,将.jar移至项目所使用的库中,但是您可以使用其他IDE来完成,就可以了。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM