1
votes

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?

2
Try this instead : -Djava.library.path=/Users/mario/Sviluppo/openalpr/src/bindings/java/libopenalprjni.so? - Chetan Kinger
nothing changes, but you should link the directory, not the file - MarioC
The Java example in the documentation ( 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
Tried too... nothing changes... - MarioC

2 Answers

1
votes

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.

0
votes

for me worked:

  System.load("/usr/lib/libopenalprjni.so");