Gentoo Archives: gentoo-java

From: Alistair John Bush <ali_bush@g.o>
To: Fabian Groffen <grobian@g.o>, Gentoo Java <gentoo-java@l.g.o>
Subject: Re: [gentoo-java] Patch for LIBRARY_PATH support in gjl
Date: Tue, 15 May 2007 07:04:12
Message-Id: 46495AFE.2040607@gentoo.org
In Reply to: Re: [gentoo-java] Patch for LIBRARY_PATH support in gjl by Fabian Groffen
1 Fabian Groffen wrote:
2 >
3 > The only problem I see here is that LD_LIBRARY_PATH is something that
4 > may be called DYLD_LIBRARY_PATH or SHLIBS_PATH on different platforms.
5 > Additionally, it should be unset in normal use, as it is considered
6 > harmful. JAVA_LIBRARY_PATH feels better for this reason, and can be
7 > safely injected in the environment, if neccesary.
8 >
9 > Just my 2 cents.
10 >
11
12 I have to agree with grobian.
13
14 so here is the result of an example command
15
16 $ JAVA_LIBRARY_PATH="test" gjl -a -p jython
17 gjl_args=" -classpath
18 /usr/share/jython/lib/jython.jar:/usr/share/libreadline-java/lib/libreadline-java.jar:/usr/share/junit/lib/junit.jar:/usr/share/javacc/lib/javacc.jar
19 -Djava.library.path="/lib:/usr/lib:test:/usr/lib64/libreadline-java"
20
21
22 and the patch
23
24 $ svn diff gjl
25 Index: gjl
26 ===================================================================
27 --- gjl (revision 4648)
28 +++ gjl (working copy)
29 @@ -113,6 +113,11 @@
30 args += ' -classpath %s' % (classpath)
31
32 if library:
33 + envlp = os.getenv('JAVA_LIBRARY_PATH')
34 +
35 + if envlp:
36 + library = ':'.join(('/lib:/usr/lib', envlp, library))
37 +
38 args += ' -Djava.library.path="%s"' % (library)
39
40 if args:
41
42
43 As you can see, I have prefixed '/lib:/usr/lib' to java.library.path
44
45 I will commit this to trunk latter tonight. Is there any other
46 development occuring in trunk atm? How about unreleased functionality?
47
48 --
49 Alistair John Bush
50 Developer Gentoo Java
51
52 OpenPGP key 0x4900CFB7
53 www.gentoo.org
54 www.gentoo.org/proj/en/java
55 --
56 gentoo-java@g.o mailing list

Replies

Subject Author
Re: [gentoo-java] Patch for LIBRARY_PATH support in gjl "Petteri Räty" <betelgeuse@g.o>