1

I have a 3rd party jar file that requires a .dll to run.

Referring to this post, I have successfully placed both my 3rd party jar files and the dll files into my person repo at .m2.

I'm am still getting errors:

java.lang.UnsatisfiedLinkError: Unable to load library 'libtesseract302': The specified module could not be found.

Do i have to specify a build path in maven to ensure that dll files work?

Or is there a way to build the jar file together with the DLL file to prevent this error?

Community
  • 1
  • 1
kenwjj
  • 341
  • 1
  • 7
  • 21
  • SOLVED: I loaded the dll through the method mentioned here: http://stackoverflow.com/questions/1611357/how-to-make-a-jar-file-that-include-dll-files?rq=1 – kenwjj Aug 04 '13 at 17:41

1 Answers1

1

The error you're getting means the dll cannot be found in the java.library.path.

Unfortunately You cannot load DLL from the JAR directly. You can package it within the JAR and unpack it before loading it. Checkout the question Extract and load DLL from JAR.

Community
  • 1
  • 1
lpiepiora
  • 13,659
  • 1
  • 35
  • 47
  • Thanks! You pointed me in the right direction. I refered to this [link](http://stackoverflow.com/questions/1611357/how-to-make-a-jar-file-that-include-dll-files?rq=1) in the end. – kenwjj Aug 04 '13 at 17:41