deeplearning4j: deeplearning4j 0.4.0 breaks on Windows 10 Insider Preview

When I’m trying to run the examples I always get the jnind4j.dll not in java.library.path error. I have debugged this to the point where I can say that the ClassLoader is unable to load the dlls because it does not find the dependent libraries.

java.lang.UnsatisfiedLinkError: C:\Users\tnolle\AppData\Local\Temp\javacpp2198661413766\jnind4j.dll: Can't find dependent libraries

Funnily it all works fine when using the last RC version of the library. Also everything works fine when using the stable build of Windows 10.

The library cannot be loaded after if(isAbsolute) in the ClassLoader:

static void loadLibrary(Class<?> fromClass, String name, boolean isAbsolute) {
        ClassLoader loader =
            (fromClass == null) ? null : fromClass.getClassLoader();
        if (sys_paths == null) {
            usr_paths = initializePath("java.library.path");
            sys_paths = initializePath("sun.boot.library.path");
        }
        if (isAbsolute) {
            if (loadLibrary0(fromClass, new File(name))) {
                return;
            }
            throw new UnsatisfiedLinkError("Can't load library: " + name);
        }

The fact that it worked perfectly before the 0.4.0 let’s me hope that this can perhaps be fixed very easily, but I can’t seem to find how.

Cheers, T

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Comments: 23 (14 by maintainers)

Most upvoted comments

Ok, so the solution for the moment is to have the dependency for nd4j-native to be like this:

        <dependency>
            <groupId>org.nd4j</groupId>
            <artifactId>nd4j-native</artifactId>
            <version>${nd4j.version}</version>
        </dependency>
        <dependency>
            <groupId>org.nd4j</groupId>
            <artifactId>nd4j-native</artifactId>
            <version>${nd4j.version}</version>
            <classifier>windows-x86_64-openblas</classifier>
        </dependency>
        <dependency>
            <groupId>org.nd4j</groupId>
            <artifactId>nd4j-native</artifactId>
            <version>${nd4j.version}</version>
            <classifier>windows-x86_64</classifier>
            <scope>provided</scope>
        </dependency>