Re: Patch for LIBRARY_PATH support in gjl
Alistair John Bush <[email protected]>
| Newsgroups | gmane.linux.gentoo.java |
|---|---|
| Message-ID | <[email protected]> |
Fabian Groffen wrote:
>
> The only problem I see here is that LD_LIBRARY_PATH is something that
> may be called DYLD_LIBRARY_PATH or SHLIBS_PATH on different platforms.
> Additionally, it should be unset in normal use, as it is considered
> harmful. JAVA_LIBRARY_PATH feels better for this reason, and can be
> safely injected in the environment, if neccesary.
>
> Just my 2 cents.
>
I have to agree with grobian.
so here is the result of an example command
$ JAVA_LIBRARY_PATH="test" gjl -a -p jython
gjl_args=" -classpath
/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
-Djava.library.path="/lib:/usr/lib:test:/usr/lib64/libreadline-java"
and the patch
$ svn diff gjl
Index: gjl
===================================================================
--- gjl (revision 4648)
+++ gjl (working copy)
@@ -113,6 +113,11 @@
args += ' -classpath %s' % (classpath)
if library:
+ envlp = os.getenv('JAVA_LIBRARY_PATH')
+
+ if envlp:
+ library = ':'.join(('/lib:/usr/lib', envlp, library))
+
args += ' -Djava.library.path="%s"' % (library)
if args:
As you can see, I have prefixed '/lib:/usr/lib' to java.library.path
I will commit this to trunk latter tonight. Is there any other
development occuring in trunk atm? How about unreleased functionality?
--
Alistair John Bush
Developer Gentoo Java
OpenPGP key 0x4900CFB7
www.gentoo.org
www.gentoo.org/proj/en/java
--
[email protected] mailing list