Java 在JAR中找不到sqljdbc_auth.dll。(根据IntelliJ)
我无法解决这个问题:Java 在JAR中找不到sqljdbc_auth.dll。(根据IntelliJ),java,intellij-idea,jetbrains-ide,sqljdbc,java.library.path,Java,Intellij Idea,Jetbrains Ide,Sqljdbc,Java.library.path,我无法解决这个问题: Exception in thread "main" java.lang.RuntimeException: java.io.FileNotFoundException: File /x64/sqljdbc_auth.dll was not found inside JAR. at com.intellij.execution.rmi.RemoteServer.setupDomainAuth(RemoteServer.java:131) at com.intellij.ex
Exception in thread "main" java.lang.RuntimeException: java.io.FileNotFoundException: File /x64/sqljdbc_auth.dll was not found inside JAR.
at com.intellij.execution.rmi.RemoteServer.setupDomainAuth(RemoteServer.java:131)
at com.intellij.execution.rmi.RemoteServer.start(RemoteServer.java:55)
at com.intellij.database.remote.RemoteJdbcServer.main(RemoteJdbcServer.java:15)
Caused by: java.io.FileNotFoundException: File /x64/sqljdbc_auth.dll was not found inside JAR.
at com.intellij.execution.rmi.RemoteServer.extractLibraryFromJar(RemoteServer.java:171)
at com.intellij.execution.rmi.RemoteServer.setupDomainAuth(RemoteServer.java:127)
... 2 more
我已经在
C:\Windows\System32
中复制了sqljdbc\u auth.dll
,但它不起作用。如果您已将sqljdbc\u auth.dll
库放置在系统路径中(这将是C:\Windows\System32
),然后,您应该能够使用集成安全性,使用jtds或Microsoft JDBC驱动程序连接到MSSQL数据库
对我来说,关键是让“使用Windows域身份验证”框处于未选中状态,然后在“高级”选项卡中,将“integratedSecurity”属性从false切换到true
我正在运行IntelliJ 14.1.6如果您从IntelliJ IDEA中下载Microsoft SQL Server驱动程序,您将看到他们将x86/sqljdbc_auth.dll和x64/sqljdbc_auth.dll包装在jar文件中,然后将此jar添加到类路径中。
如果您处于脱机状态,请使用
jar-cvf sqljdbc\u auth.jar x*
将文件夹包装到jar中,并手动将其添加到类路径。对我不起作用。。。集成身份验证失败。对我来说非常有效。非常感谢@Nate!就是这样。删除复选框设置,并在“高级”选项卡中添加set integratedSecurity=true。URL中不再需要integratedSecurity=true。