JDBC 中缺少 dll [英] dll missing in JDBC
问题描述
我目前正在 Java 中使用 SQL.最近我收到了这个错误:
I am currently working with SQL in Java. Recently I got this error:
com.microsoft.sqlserver.jdbc.AuthenticationJNI <clinit>
WARNING: Failed to load the sqljdbc_auth.dll cause : no sqljdbc_auth in java.library.path
当我在连接字符串中添加参数 integratedSecurity=true;
时会发生这种情况.错误信息清楚地表明缺少 sqljdbc_auth.dll,因此我尝试将 dll 放在与保留 sqljdbc4.jar 相同的路径中.
This happens when I add the parameter integratedSecurity=true;
in the connection String.
The error message clearly says that sqljdbc_auth.dll is missing, so I tried to put the dll in the same path as I keep sqljdbc4.jar.
但是,这不起作用,所以我想知道我实际上如何将这个 dll 添加到我的构建路径中?有什么特别的方法吗?
However, this doesn't work, so I wanted to know how I actually can add this dll to my build path? Is there a special way to do it?
推荐答案
好的,我发现了!我真的不需要更改 java.library.path 而是 sqljdbc.jar 的本机库位置"
Alright guys, I found it out! I didn't really need to change the java.library.path but the "Native library location" of sqljdbc.jar
这是我能找到的最佳答案:https://stackoverflow.com/a/958074/2000342
This is the best answer I could find: https://stackoverflow.com/a/958074/2000342
现在可以了,感谢支持!
It works now, thanks for the support!
这篇关于JDBC 中缺少 dll的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!