I am currently working with SQL in Java. Recently I got this error:
com.microsoft.sqlserver.jdbc.AuthenticationJNI
WARNING: Failed to load the
You have to make sure your DLL is in the classpath.
One such way to do so is to put the path to the DLL in PATH environment variable.
Other option is to add it to the VM arguments in the variable LD_LIBRARY_PATH, like this:
java -Djava.library.path=/path/to/my/dll -cp /my/classpath/goes/here MainClass
For easy fix follow these steps:
restart either eclipse or netbeans
You need to set a -D system property called java.library.path
that points at the directory containing the sqljdbc_auth.dll
.