Я создал .jar моего java-приложения, и когда я пытаюсь запустить этот .jar из cmd, я получаю сообщение об ошибке.
Я искал и нашел много примеров, но никто не работает для меня. Я установил java.library.path в каталог "sqljdbc_auth.dll, как я видел здесь, но ошибка непрерывная.
http://www.linglom.com/images/howto/netbeans/sqlserver/part3/8.png
Запускаю приложение java с помощью команды: java -Djava.library.path = "my dll path" и даю следующее:
PS C:\Users\User> java -Djava.library.path="C:\Users\User\Desktop\Microsoft JDBC Driver 4.0 for SQL Server\sqljdbc
_4.0\ptb\auth\x64"
Error: Could not find or load main class .library.path=C:\Users\User\Desktop\Microsoft JDBC Driver 4.0 for SQL Server
\sqljdbc_4.0\ptb\auth\x64
Я действительно не понимаю, как это решить. Я искал много времени, но ничего не работает. Пожалуйста, помогите мне.
спасибо
WARNING: Failed to load the sqljdbc_auth.dll cause : no sqljdbc_auth in java.library.path
com.microsoft.sqlserver.jdbc.SQLServerException: This driver is not configured for integrat
ectionId:0481a2ee-4ac4-4fd3-89cd-58aad1696fe4
at com.microsoft.sqlserver.jdbc.SQLServerConnection.terminate(SQLServerConnection.j
at com.microsoft.sqlserver.jdbc.AuthenticationJNI.<init>(AuthenticationJNI.java:60)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.logon(SQLServerConnection.java:
at com.microsoft.sqlserver.jdbc.SQLServerConnection.access$000(SQLServerConnection.
at com.microsoft.sqlserver.jdbc.SQLServerConnection$LogonCommand.doExecute(SQLServe
at com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:5696)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLServerConnect
at com.microsoft.sqlserver.jdbc.SQLServerConnection.connectHelper(SQLServerConnecti
at com.microsoft.sqlserver.jdbc.SQLServerConnection.login(SQLServerConnection.java:
at com.microsoft.sqlserver.jdbc.SQLServerConnection.connect(SQLServerConnection.jav
at com.microsoft.sqlserver.jdbc.SQLServerDriver.connect(SQLServerDriver.java:1012)
at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at test.database.Conection.getConexao(Conection.java:41)
at test.forms.jTLogin.<init>(jTLogin.java:71)
at test.forms.jTLogin$4.run(jTLogin.java:448)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$400(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
Caused by: java.lang.UnsatisfiedLinkError: no sqljdbc_auth in java.library.path
at java.lang.ClassLoader.loadLibrary(Unknown Source)
at java.lang.Runtime.loadLibrary0(Unknown Source)
at java.lang.System.loadLibrary(Unknown Source)
at com.microsoft.sqlserver.jdbc.AuthenticationJNI.<clinit>(AuthenticationJNI.java:3
... 28 more