FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Fedora Development Java

 
 
LinkBack Thread Tools
 
Old 04-08-2008, 12:47 PM
Andrew Haley
 
Default Dealing with LD_LIBRARY_PATH for a package using JNI

Mary Ellen Foster wrote:
> I'm currently working on enabling the "jpl" Java interface to the SWI
> Prolog (package is called "pl" in Fedora). This provides a
> bidirectional interface between Prolog and Java -- you can call Prolog
> from Java or (what I'm doing in my current project) call Java from
> Prolog.
>
> I'm attempting to follow the Java packaging guidelines for JNI-using
> projects and putting jpl.jar and libjpl.so into $LIBDIR/pl-jpl and
> patching files so that the libraries get loaded, and that's going
> well.
>
> One thing I'm not sure how to deal with: libjpl.so is linked against
> libjava.so and libjvm.so. On my machine, that means I need to set
> LD_LIBRARY_PATH to
> /usr/lib/jvm/java/jre/lib/i386:/usr/lib/jvm/java/jre/lib/i386/client
> before I run Prolog, and the same is probably the case if I wanted to
> use the Java-to-Prolog direction.

The command-line program 'java' already sets its LD_LIBRARY_PATH, so
it shouldn't be necessary when calling from Java.

Andrew.

--
fedora-devel-java-list mailing list
fedora-devel-java-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-devel-java-list
 
Old 04-08-2008, 12:51 PM
"Mary Ellen Foster"
 
Default Dealing with LD_LIBRARY_PATH for a package using JNI

On 08/04/2008, Andrew Haley <aph@redhat.com> wrote:
> Mary Ellen Foster wrote:
> > One thing I'm not sure how to deal with: libjpl.so is linked against
> > libjava.so and libjvm.so. On my machine, that means I need to set
> > LD_LIBRARY_PATH to
> > /usr/lib/jvm/java/jre/lib/i386:/usr/lib/jvm/java/jre/lib/i386/client
> > before I run Prolog, and the same is probably the case if I wanted to
> > use the Java-to-Prolog direction.
>
> The command-line program 'java' already sets its LD_LIBRARY_PATH, so
> it shouldn't be necessary when calling from Java.

Okay, so this is just a problem if I want to run Prolog and access
Java from inside there. Is it acceptable to tell people to set their
LD_LIBRARY_PATH if they want to use jpl in this direction? That's
essentially what upstream tells you to do (except they describe the
Windows case): http://www.swi-prolog.org/packages/jpl/installation.html

MEF

--
Mary Ellen Foster -- http://homepages.inf.ed.ac.uk/mef/
Informatik 6: Robotics and Embedded Systems, Technische Universität München
and ICCS, School of Informatics, University of Edinburgh

--
fedora-devel-java-list mailing list
fedora-devel-java-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-devel-java-list
 

Thread Tools




All times are GMT. The time now is 06:57 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org