lucene-pylucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bill Janssen <>
Subject Re: using org.apache.jcc.PythonVM
Date Fri, 04 Mar 2011 17:42:59 GMT
Andi Vajda <> wrote:

> Something's off. is not shown in your list.
> You need to solve that mystery before embedding can proceed.

So, I went to my Mac, and looked for libjcc.dylib.  Sure enough,
it's there.  So I tried this simple program:

import org.apache.jcc.PythonVM;

public class test {

    public static void main (String[] argv) {
             new String[] { "-c", "import time; print time.localtime()"});

Here's what happens:

% javac -classpath /Library/Python/2.5/site-packages/JCC-2.6-py2.5-macosx-10.5-i386.egg/jcc/classes:.
% java -Djava.library.path=/Library/Python/2.5/site-packages/JCC-2.6-py2.5-macosx-10.5-i386.egg
-classpath /Library/Python/2.5/site-packages/JCC-2.6-py2.5-macosx-10.5-i386.egg/jcc/classes:.
Exception in thread "main" java.lang.UnsatisfiedLinkError: /Library/Python/2.5/site-packages/JCC-2.6-py2.5-macosx-10.5-i386.egg/libjcc.dylib:
 Symbol not found: __Py_NoneStruct   Referenced from: /Library/Python/2.5/site-packages/JCC-2.6-py2.5-macosx-10.5-i386.egg/libjcc.dylib
  Expected in: dynamic lookup 
	at java.lang.ClassLoader$NativeLibrary.load(Native Method)
	at java.lang.ClassLoader.loadLibrary0(
	at java.lang.ClassLoader.loadLibrary(
	at java.lang.Runtime.loadLibrary0(
	at java.lang.System.loadLibrary(
	at org.apache.jcc.PythonVM.<clinit>(
	at test.main(
% otool -L /Library/Python/2.5/site-packages/JCC-2.6-py2.5-macosx-10.5-i386.egg/libjcc.dylib
	@rpath/libjcc.dylib (compatibility version 2.6.0, current version 2.6.0)
	/System/Library/Frameworks/JavaVM.framework/Versions/A/JavaVM (compatibility version 1.0.0,
current version 1.0.0)
	/usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 7.4.0)
	/usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1.0.0)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 111.1.5)


View raw message