Search code examples
junitunsatisfiedlinkerror

JUnit UnsatisfiedLinkError


I'm running a simple JUnit Test and in its execution I got this error:

java.lang.UnsatisfiedLinkError: no jmupdf64 in java.library.path

any help?


Solution

  • You need to add this JVM option:

    -Djava.library.path="<the directory of jmupdf64>"
    

    For Mac OSX:
    You need to create libjmupdf64.dylib

    1. Download source code from: http://code.google.com/p/jmupdf/downloads/list

    2. Commenting out Line#67 file: ./thirdparty/tifflib/tif_config.h:

      // #define lfind _lfind

    3. Need to more settings for OSX:

      • Add JNI header files to CFLAGS in ./Makefile.
      • Change JNI_DLL to libjmupdf64.dylib.
      • etc...
    4. Make lib:

      $ make