0

To keep it short & sweet, I have written an ant file that compiles my source code, unjars the libraries for slick2d, nifty, etc, zips that up into it's own jar and then copies the lwjgl native dlls into the same folder, so the folder layout is something like this:

/bin/
 output.jar
 lwjgl.dll
 lwjgl64.dll

But for some reason, output.jar gives me an UnsatisfiedLinkException saying it cannot find the natives. Any ideas on what I can do? I got the same result while packing the natives inside the .jar file too.

Dan
  • 10,282
  • 2
  • 37
  • 64

1 Answers1

0

The path to DLL is not in the search path.

This question is very close to Java - Loading dlls by a relative path and hide them inside a jar if not a direct duplicate.

Aproach is Embed DLL as a resource in jar, extract the DLL somewhere and then load it. (JNA does this)

Community
  • 1
  • 1
Jayan
  • 18,003
  • 15
  • 89
  • 143
  • I did search for a good hour before posting this so not sure why I found that. However, I don't see how that changes anything? It does the same thing that my approach currently does - copies the natives outside of the jar. Unless I am missing something. – Dan Jun 25 '12 at 15:41