0

I have a 32 bit .dll (sqljdbc_auth.dll) and develope on a 32 bit jdk. My System is 64 Bit. It works all the time, but now i create a runnable jar file, this file can be execute. But when i started it over a Batch File (-jar %~dp0\ScheduledPerformanceanalyse.jar) it dosent work. Warning: Faild to load the sqljdbc_auth.dll: Cant load aIA 32-bit .dll on AMD 64bit platform. By changing the dll to a 64 bit version it works fine, but only by the batch, by my Web-Applikation it doesen't. My Question: How can I fix the problem without changing my jdk to a 64 bit Version?

EDIT: I found the solution, the problem was the jre 64 bit. On the working system were both jre's installed. The batch-File used the JRE 64 not the 32 bit...

  • Does the webapp also use a 32-bit JRE? – nanofarad Aug 14 '14 at 15:52
  • There is also a 64 bit version of sqljdbc_auth.dll, and if you use the latest version of the SQL Server JDBC driver, you don't even need the DLL if you specify the right connection string. – Mark Rotteveel Aug 14 '14 at 15:54
  • 1
    The develop-JDK is not the problem. The runtime-JRE is the problem. If it is a 32bit you need a 32bit dll, if it is a 64bit JRE you need a 64bit dll. You want to support both versions you need both DLLs. – Robert Aug 14 '14 at 15:57
  • And if you switch to jTDS you don't need any DLL's – Durandal Aug 14 '14 at 16:12

0 Answers0