javamicrosoft-information-protection

MIP SDK Java Wrapper Sample Fails to Start


I'm trying to start the sample program packaged with the MIP SDK Java Wrapper 1.8.86 on an amd64 Windows machine.

I've copied the mip_java.dll to the sdk directory as instructed, added the absolute path to the file/bins/release/amd64 directory to the front of the java.library.path system property and replaced the null argument in MIP#initialize with the same path. Then, I started the program.

The result was:

Can't load <...>\file\bins\release\amd64\mip_file_sdk.dll . Error was:<...>\file\bins\release\amd64\mip_file_sdk.dll: Can't find dependent libraries

So I analyzed the dependencies with Dependencies which found all dependencies on my machine. I then proceeded to load each dependency manually using System#loadLibrary until I got the following error:

<...>\file\bins\release\amd64\libgmodule-2.0-0.dll: The specified procedure could not be found

(translated from German "Die angegebene Prozedur wurde nicht gefunden")

Any idea what I should try next?


Solution

  • Are you using debug or release mode?

    There's a bug in the current Java SDK that requires all of the DLLs from the SDK to be copied to the root path of the project. I expect we'll fix that in 1.9.

    You can try to pull this project and see if it works. You'll need to copy all of the SDK DLLs from 1.8.97 to the project root and run it.

    https://github.com/Azure-Samples/mipsdk-filesdk-java-sample