[execnet-dev] Calling makegateway with JAVA_OPTIONS

Christophe Siraut d at tobald.eu.org
Thu Oct 17 11:33:22 CEST 2013


Hello,

Using execnet.makegateway with jython, it seems I cannot change the java.library.path:

>>> import execnet
>>> gw = execnet.makegateway('popen//python=jython//env:JAVA_OPTIONS=-Djava.library.path=/tmp')
>>> channel = gw.remote_exec("""
...       from java.lang import *
...       channel.send(System.getProperty('java.library.path'))
... """)
>>> print channel.receive()
/usr/lib/jni

While it works from the shell:

$ JAVA_OPTIONS=-Djava.library.path=/tmp jython
Jython 2.5.2 (Debian:hg/91332231a448, May 8 2012, 09:50:46) 
[OpenJDK Server VM (Sun Microsystems Inc.)] on java1.6.0_27
Type "help", "copyright", "credits" or "license" for more information.
>>> from java.lang import *
>>> print System.getProperty('java.library.path')
/tmp:/usr/lib/jni

Do I misuse the remote environment variable setting? Do you know any workaround?

Thank you,
Christophe


More information about the execnet-dev mailing list