OpenSlide Java "Cant find dependent libraries"

Benjamin Gilbert bgilbert at cs.cmu.edu
Fri May 30 01:35:45 EDT 2014


On 05/29/2014 04:24 PM, Kim, Timothy H. wrote:
> $ ./build.sh setup /cygdrive/c/Users/thk/Desktop/setup-x86_64.exe
> $ ./build.sh -m64 bdist
>
> This created a .zip file, which contains the native libraries. I wrote a
> simple Java program that created an OpenSlide object referencing an
> image. However, when the object is initialized, it tries to access the
> native library “openslide-jni.dll” and gives the error message “Can’t
> find dependent libraries.”  The .dll is searching in the same location
> as where we unzipped the file created from the build.sh script.

The search path should be the "bin" subdirectory, not the top-level 
directory.

> Are there any additional libraries that I need to reference other than
> the ones that were built from the build.sh script?

Everything should have been built by build.sh.  If you double-click 
openslide.jar in the unzipped bin directory, that will launch a demo 
slide viewer app.  If you can open a slide file with the demo viewer, 
the problem is likely your search path.

If the demo viewer doesn't work, you can try opening openslide-jni.dll 
in Dependency Walker to find the missing dependency.  Please let us know 
what you discover.

--Benjamin Gilbert



More information about the openslide-users mailing list