Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Cannot load the PDFlib shared library/DLL for Java.

1,394 views
Skip to first unread message

Tim

unread,
Feb 13, 2003, 8:24:07 PM2/13/03
to
From the pdflib examples, Hello.java compiles without error. Run it.
The following errors occur:

Cannot load the PDFlib shared library/DLL for Java.
Make sure to properly install the native PDFlib library.

I placed libpdf_java.so.0.0.0 in /usr/lib with two symbolic links:
libpdf_java.so.0 and libpdf_java.so. I been through the manual. I
seem to have installed this right. What am I doing wrong?

Tim

unread,
Mar 1, 2003, 6:30:57 PM3/1/03
to
timnan...@netscape.net (Tim) wrote in message news:<9b1e30a1.03021...@posting.google.com>...

I figured out my problem; thought I would post here for other folks to
reference.

For JNI to find an external library, the library must be in the
LD_LIBRARY_PATH. I'm using Redat Linux here. I placed libpdf* into
the /usr/local/lib directory. /usr/local/lib was added to the shell
variable LD_LIBRARY_PATH. Now, Hello.java executes from either the
command line or NetBeans.

An alternative for command line execution is

java -Djava.library.path=/usr/local/lib Hello

This works too, but who wants to mess with parameters? I perfer
environment variables.

0 new messages