JvInitClass calls exit?

Andi Vajda andi@osafoundation.org
Fri Dec 9 17:43:00 GMT 2005


On Fri, 9 Dec 2005, tsuraan wrote:

> On 09/12/05, Andrew Haley <aph@redhat.com> wrote:
>> You need to give us a reproducable test case.  That is, you must say
>> *exactly* how you built this.
>>
>> In addition, make sure you have read and understood this thread:
>>
>> http://gcc.gnu.org/ml/java/2005-12/msg00097.html
>
> Ok, I can't say I completely understand the thread (I have no idea
> what a PLT thunk is), but it looks like the gist of it is that it's
> hard to mix java and c++ when using shared libraries.

You can mix java and C++ in shared libraries.

> tar xzvf lucene-1.4.3-src.tar.gz
> patch -p0 < lucene.patch (the attachment to the previous email)
> find lucene-1.4.3/src/java -name '*.java' > lucene.contents
>
> mkdir -p lib
> /opt/gcc-4.1/bin/gcj -c -o lib/liblucene.so @lucene.contents
> /usr/bin/ar -r -v lib/liblucene.a lib/liblucene.so

I've had a much better experience compiling .class files with gcj than 
compiling .java files. Maybe some of the bugs I encountered have been fixed 
since, but I remember gcj being unhappy about a number of Lucene's inner class 
use, when compiling from .java.
Also, you are going to need to patch Searcher.java to workaround gcj's bug 
15411. Again, see http://svn.osafoundation.org/pylucene/trunk/patches.lucene

Andi..



More information about the Java mailing list