mzsanford / cld

Language Detection based on Chromium's Compact Language Detector library
http://mzsanford.com/blog/introducing-libcld
BSD 3-Clause "New" or "Revised" License
104 stars 24 forks source link

jni .so file doesn't work #32

Open zzang9083 opened 8 years ago

zzang9083 commented 8 years ago

I'm trying to build the Java port of cld on centos 64-bit , using Virtualbox. I followed your 'README.md' and Setting was finished. i made new java project and i move 'cld/ports/java/java/src' to new '/src'. but it doesn't work. error is

Exception in thread "main" java.lang.UnsatisfiedLinkError: com.mzsanford.cld.CompactLanguageDetector.detectLanguageDetails(Ljava/lang/String;ZZZZLjava/lang/String;)Lcom/mzsanford/cld/LanguageDetectionResult; at com.mzsanford.cld.CompactLanguageDetector.detectLanguageDetails(Native Method) at com.mzsanford.cld.CompactLanguageDetector.detect(CompactLanguageDetector.java:23) at com.mzsanford.cld.CompactLanguageDetector.main(CompactLanguageDetector.java:41)

what should i do?

mzsanford commented 6 years ago

I have two Dockerfiles in the tests directory that build the Java port for OpenJDK and the Oracle JDK respectively. Try out docker build -t test/cld:centos6-openjdk -f tests/Dockerfile.centos6.openjdk . and let me know if that works for you … tests/Dockerfile.centos6.openjdk may contain whatever is missing from the build steps. Let me know what CentOS version and I can create another Dockerfile to try and replicate the error.