Java access bridge broken dll

262 Views Asked by At

After I discovered that JAB is inlcuded in the JDK since Java SE 7, I finally included the headers and libs, compiled and got this strange error:

C:\Program Files (x86)\Java\jre7\bin\JavaAccessBridge-32.dll : fatal error LNK1107: Ungültige oder beschädigte Datei: Lesen bei 0x2B8 nicht möglich.

Meaning that the lib is not valid or broken. Does anybody know what is wrong with this setup?

2

There are 2 best solutions below

0
On BEST ANSWER

Okay the problem was that JavaAccessBridge-32.dll is not meant to be loaded statically. Its a pure dll that has to be loaded programatically.

0
On

You need to provide the import library (likely named JavaAccessBridge-32.lib) to the linker, not the DLL.