Hi, I wanted to ask if there was any progress on this issue (extending classpath runtime): http://lists.osafoundation.org/pipermail/pylucene-dev/2008-March/002455.html
Here is a longer version: I would like to use several Java libraries from python, one of them PyLucene, the other GATE and others. I compiled GATE into separate egg and after some experiments, I was able to start two jcc modules - however, it fails if I import first my module and then lucene. This works fine, but all the -Dgate.home are actually needed for the second pyjama.initVM(): == import lucene import pyjama lucene.initVM(lucene.CLASSPATH, vmargs='-Dgate.site.config=C:/dev/workspace/newseman/src/merkur/cfg//gate.xml,-Dgate.plugins.home=C:/dev/workspace/newseman/src/merkur/cfg/ANNIE/plugins,-Dgate.user.config=C:/dev/workspace/newseman/src/merkur/cfg//user.xml,-Dgate.user.session=C:/dev/workspace/newseman/src/merkur/cfg//gate.session,-Xms32m,-Xmx256m') pyjama.initVM(pyjama.CLASSPATH) == this will fail: == import lucene import pyjama pyjama.initVM(pyjama.CLASSPATH, vmargs='-Dgate.site.config=C:/dev/workspace/newseman/src/merkur/cfg//gate.xml,-Dgate.plugins.home=C:/dev/workspace/newseman/src/merkur/cfg/ANNIE/plugins,-Dgate.user.config=C:/dev/workspace/newseman/src/merkur/cfg//user.xml,-Dgate.user.session=C:/dev/workspace/newseman/src/merkur/cfg//gate.session,-Xms32m,-Xmx256m') lucene.initVM(lucene.CLASSPATH) ERROR:root:Traceback (most recent call last): File "C:\dev\workspace\newseman\src\merkur\runwf.py", line 79, in get_workflow execfile(filename, x.__dict__) File "wtf_test.py", line 19, in <module> from merkur import test File "C:\dev\workspace\newseman\src\merkur\test.py", line 24, in <module> lucene.initVM(lucene.CLASSPATH) JavaError: java.lang.NoClassDefFoundError: org/apache/lucene/analysis/ar/ArabicA nalyzer Java stacktrace: java.lang.NoClassDefFoundError: org/apache/lucene/analysis/ar/ArabicAnalyzer Caused by: java.lang.ClassNotFoundException: org.apache.lucene.analysis.ar.Arabi cAnalyzer at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) === If I do this, everyrthing is OK: pyjama.initVM(os.pathsep.join([lucene.CLASSPATH, pyjama.CLASSPATH]), vmargs=... lucene.initVM(lucene.CLASSPATH) So it seems to me, that the second initVM() call has no effect. And obviously, I have to make sure it is me who calls initVM() with correct arguments as a first one (which might be difficult to secure). Am I doing something wrong? Best, Roman