Hi Jack,

If Java complains that something is not in "java.library.path" it means 
that ".jar" package you loaded tries to load native (JNI) shared library 
and cannot find it.
In the case it complains that it cannot find "liblink-grammar-java.so" 
library.

First of all you may check if this file is built, just execute `find -name 
liblink-grammar-java.so` in link-grammar build directory. If you cannot 
find the file, try to re-run `./configure` and check if it says that java 
bindings will be build. Ant is necessary to build java bindings so as Linas 
said above probably `./configure` and `make` will build them after ant is 
installed.

Next `make install` should copy library into standard directory to make 
loading possible without additional effort. List of such places is located 
at `/etc/ld.so.conf` and `/etc/ld.so.conf.d/*`. You may need to run `sudo 
ldconfig` after install to add links to the specific library version.

If library installed in non-standard place then it still possible to load 
it adding installation directory to shell `LD_LIBRARY_PATH` variable or 
java `java.library.path` variable. If you are using Eclipse you should be 
able to modify `java.library.path` in the project settings.

Best regards,
  Vitaly

On Thursday, May 30, 2019 at 8:02:13 AM UTC+3, linas wrote:
>
>
>
> On Wed, May 29, 2019 at 11:43 PM Jack Park <[email protected] 
> <javascript:>> wrote:
>
>> Thank you. I did some other experiments and managed to make this 
>> deduction:
>> I did not have Ant installed when I built the platform. I only discovered 
>> that when I went in to hand build the linkgrammar.jar
>> But, that led to this: it apparently did not install the JNI stuff; there 
>> is no /usr/lib/jni or /usr/local/lib/jni directory.
>>
>> With Ant installed, I tried to run make install again on LinkGrammar - 
>> you can tell I'm not a *nix pro - and it says 'nothing to do'
>>
>
> I believe that  it is `configure` that searches for `ant`; so you have to 
> run configure again, then make, then make install.
>
> Sometimes saying `make clean` before you restart helps, as an extra magic 
> incantation.
>
> I guess I'm wrong about /usr/local/lib/jni -- its not on my system either. 
> java has about a million different favorite places to install things, it is 
> hard to guess what the flavor of the month is.  
>
> --linas
>
>
>> So, I am wondering what is the work around to coax it to install the 
>> java-jni bindings - if, indeed, they are needed.
>>
>> Many thanks
>> -jack
>>
>> On Wednesday, May 29, 2019 at 8:23:51 PM UTC-7, linas wrote:
>>>
>>>
>>>
>>> On Wed, May 29, 2019 at 10:14 PM Jack Park <[email protected]> 
>>> wrote:
>>>
>>>> Correction: no link-grammar-java
>>>>
>>>
>>> Well, that just says that something somewhere is not finding the 
>>> link-grammar java bindings.  I cannot speculate why. Maybe some CLASSPATH 
>>> doesn't point to the where the link-grammar jar file is.  Normally, I think 
>>> it ends up in /usr/local/share/java/linkgrammar.jar
>>>
>>> viz. java -classpath /usr/local/share/java/linkgrammar.jar 
>>> relex.RelationExtractor -h
>>>
>>> If that doesn't fix it try adding 
>>>
>>> -Djava.library.path=/usr/local/lib:/usr/local/lib/jni
>>>
>>> I assume it's something like that.
>>>
>>> -- Linas
>>>
>>>
>>>> On Wednesday, May 29, 2019 at 6:35:56 PM UTC-7, Jack Park wrote:
>>>>>
>>>>> That's the error message in a small testbed to feed RelEx sentences 
>>>>> and learn how to process the results.
>>>>> Context:
>>>>> Simple Eclipse project on an Ubuntu box with LinkGrammar parser 5.6.1 
>>>>> installed and RelEx did run its simple test, which, I believe, means it's 
>>>>> working. 
>>>>> This project is not that RelEx but instead, uses the entire RelEx 
>>>>> library of jars in the Eclipse project, including the 
>>>>> linkgrammar.5.6.1.jar; it's all in there.
>>>>>
>>>>> I create a copy of RelationExtractor and then ask it getVersion() - 
>>>>> that's when the error occurs; it's not finding the parser.
>>>>>
>>>>> Is there a simple explanation for that error message?
>>>>>
>>>>> BTW: I posted this question in the OpenCog slack as well.
>>>>>
>>>> -- 
>>>> You received this message because you are subscribed to the Google 
>>>> Groups "opencog" group.
>>>> To unsubscribe from this group and stop receiving emails from it, send 
>>>> an email to [email protected].
>>>> To post to this group, send email to [email protected].
>>>> Visit this group at https://groups.google.com/group/opencog.
>>>> To view this discussion on the web visit 
>>>> https://groups.google.com/d/msgid/opencog/8c05b715-a4ed-4540-b696-20f0997575c1%40googlegroups.com
>>>>  
>>>> <https://groups.google.com/d/msgid/opencog/8c05b715-a4ed-4540-b696-20f0997575c1%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>> .
>>>> For more options, visit https://groups.google.com/d/optout.
>>>>
>>>
>>>
>>> -- 
>>> cassette tapes - analog TV - film cameras - you
>>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "opencog" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to [email protected] <javascript:>.
>> To post to this group, send email to [email protected] 
>> <javascript:>.
>> Visit this group at https://groups.google.com/group/opencog.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/opencog/d38f7676-c25e-4341-851a-fbb0d40556de%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/opencog/d38f7676-c25e-4341-851a-fbb0d40556de%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
> -- 
> cassette tapes - analog TV - film cameras - you
>

-- 
You received this message because you are subscribed to the Google Groups 
"opencog" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/opencog.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/opencog/184f2cd4-653b-4e67-a8aa-b27a88280006%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to