link-grammar
                                
                                
                                
                                    link-grammar copied to clipboard
                            
                            
                            
                        Orcale JDK8 library loading config bug
I'm using link-grammar-5.3.15.
This one didn't work for me:
https://github.com/opencog/link-grammar/blob/master/bindings/java/org/linkgrammar/LinkGrammar.java#L43
Even when I added /usr/local/lib to jvm props:
java.lang.UnsatisfiedLinkError: no liblink-grammar in java.library.path
I fixed it by replacing that line into:
System.load("/usr/local/lib/liblink-grammar-java.so");
Also, please not that in https://github.com/opencog/link-grammar/blob/master/bindings/java/org/linkgrammar/LinkGrammar.java#L43 jni is marked as link-grammar-java. However I checked my /usr/local/lib and found only liblink-grammar-java.so and other file with prefix liblink-...
UPD. I'm using ubuntu 16.04 and oracle jdk 8.
Java usually handles the suffixes automatically --  .so for unix variants, or .dll for windows variants, or .dylib for MacOS variants ... including any of these suffixes explicitly would break compatibility with the different OS'es.
Is it possible that your version of oracle jdk is not correctly configured for Ubuntu? Perhaps there is some way to tell Java what suffixes should be searched for? Perhaps that search algorithm is missing or broken in jdk8? This code has been working fine on java 5 and java 6, dating back ten years now; the breakage is not the code, but some install/config issue.