1

I'm trying to use Java bindings for the project https://github.com/openalpr/openalpr

When I try to launch the java application i got this exception

Exception in thread "main" java.lang.UnsatisfiedLinkError: no openalprjni in java.library.path

I try to load the library in this way:

System.loadLibrary("openalprjni");

The file named libopenalprjni.so it's in this dir

/Users/mario/Sviluppo/openalpr/src/bindings/java

so i'm trying, with eclipse, to load it with this configuration as a VM argument -Djava.library.path=/Users/mario/Sviluppo/openalpr/src/bindings/java/ but nothing happens

What i'm doing wrong?

MarioC
  • 2,934
  • 15
  • 59
  • 111
  • Try this instead : `-Djava.library.path=/Users/mario/Sviluppo/openalpr/src/bindings/java/libopenalprjni.so`? – Chetan Kinger Jan 21 '17 at 15:13
  • 2
    nothing changes, but you should link the directory, not the file – MarioC Jan 21 '17 at 15:19
  • The Java example in the documentation ( http://doc.openalpr.com/bindings.html ) unfortunately is not a "complete" example. But I wonder whether you really have to load the library manually, with `loadLibrary`. Usually, something like this should be done by the openaplr classes internally. This may still cause the same error, though. Try putting **all** required files (including the openalph JAR, the `libopenalprjni.so` and your actual test program) into the same directory (without a package), just to check whether it can load the library *at all*. – Marco13 Jan 21 '17 at 15:47
  • Tried too... nothing changes... – MarioC Jan 22 '17 at 11:23

2 Answers2

1

Include the openalpr.dll and the required all other dll files from the binaries to your JRE or JDK bin directory. Then try to compile and run your program. Worked for me.

Hemil
  • 11
  • 1
0

for me worked:

  System.load("/usr/lib/libopenalprjni.so");
Adrian
  • 84
  • 2
  • 6