As it turns out, the problem was not in finding gnureadline; it was in
finding libjavareadline.
The example code discarded any exception thrown when trying to load the
library. When I printed out the stack trace instead, I saw which library
couldn't be loaded. Since I'm using Debian, 'libtermcap' wasn't
installed by default, which is required by javaReadLine.so. Installing
the 'libncurses5-dev' package fixed it.
It works find now.
- Bobman
Bernhard Bablok wrote:
>Hm,
>
>there must have been a change in the way the java-interpreter
>searches for libraries. Try setting the system-property java.library.path:
>
>java -Djava.library.path=/lib \
> -cp /usr/share/java/libreadline-java.jar:. CLITest
>
>Let me know if this works, so I can update the README.
>
>Thanks, Bernhard
>
>
>
>>I think I've installed the java-readline package correctly, in that a
>>simple test works with stdin. However, it can't seem to find the
>>readline library.
>>
>>I have readline in my /lib directory (libreadline.so.4). My script to
>>run my test sets the library path:
>> export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib/:/lib/
>> java -classpath /usr/share/java/libreadline-java.jar:. CLITest
>>
>>When I run it I get the following:
>> couldn't load readline lib. Using simple stdin.
>> myprompt>
>>
>>What am I missing?
>>
>>- Bobman
>>
>>
>
>
>
>-------------------------------------------------------
>This SF.NET email is sponsored by:
>SourceForge Enterprise Edition + IBM + LinuxWorld =omething 2 See!
>http://www.vasoftware.com
>_______________________________________________
>Java-readline-users mailing list
>Jav...@li...
>https://lists.sourceforge.net/lists/listinfo/java-readline-users
>
>
|