[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Compiling subversion with javahl support?

From: Andrew Vaughan <ajv-lists_at_netspace.net.au>
Date: 2005-05-23 20:43:26 CEST

On Mon, 23 May 2005 12:11 pm, Jim Morris wrote:
> To try to answer your other question, a better question is why java
> cannot find the libsvnjavahl.so when it is in the normal place for
> Linux to look for so's. The reason the libsvnjavahl.so can find its
> dependencies is because it uses the standard Linux load library
> mechanism, which looks wherever ldconfig tells it to look, usually
> /lib and /usr/lib, and occasionally /usr/local/lb. This is configured
> in /etc/ld.so.conf.
>
> However if you put the libsvnjavahl.so in any of those places Java
> will not find it unless you explicitly set java.library.path which is
> kind of inconvenient.
>
I believe that java only looks in the directories in java.library.path,
ie it does not look in /usr/lib, unless this is part of
java.library.path. (The native libraries seem to use the normal
platform methods to load any dependencies).

The class below will shows the default value of java.library.path, and
the differences between java on windows and linux.

    public class Print {
        public static void main(String[] args) {
            System.out.println(System.getProperty("java.library.path"));
        }
    }

On windows this gives
    
    C:\WINNT\system32;.;C:\WINNT\system32;C:\WINNT;c:\bin;C:
    \WINNT\system32;C:\WINNT;C:\WINNT\System32\Wbem

Note that this includes the entire path plus C:\WINNT\system32 twice
plus the current directory.)

On Linux with sun's jdk I get.

    /usr/lib/j2sdk1.5-sun/jre/lib/i386/client:/usr/lib/j2sdk1.5-sun
    /jre/lib/i386:/usr/lib/j2sdk1.5-sun/jre/../lib/i386

IBMs jdk adds /usr/lib.
> I cannot find anything that documents Eclipses behavior of being able
> to load JNI's when put in the plugins directory, but I'm sure it is
> somewhere.
>
I'm guessing that eclipse adds dirs to java.library.path. (It needs to,
otherwise java wouldn't find the swt libs.)

Cheers
Andrew
Received on Tue May 24 04:43:26 2005

This is an archived mail posted to the Subclipse Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.