This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Xerces2-j compile errors


Tom Tromey wrote:

"Alex" == Alex Lee <aintaer@aintaer.com> writes:



Alex> I'm writing a parsing relay server for handling XML messages from Alex> XMLSocket object in Flash 6. However, my webmaster tells me he will Alex> absolutely not install java runtime on the server. Alex> So I'm trying to use GCJ to make an executable out of it.

Nice!

Alex> `CSClient::CSClient(CommServer*, java::net::Socket*)':
Alex> : undefined reference to
Alex> `javax::xml::parsers::SAXParserFactory::newInstance()'

Alex> So I'm wondering, do I have to compile xerces first as libraries, then
Alex> include them?  Or is there something fundamentally broken?

Compiling with gcj is like compiling a C program.  The libraries you
depend on also have to be compiled and linked in.

Tom



Okay, I grabbed the rhug cvs and compiled the xerces libraries. I compiled:
-bash-2.05b$ gcj CommServer.java CSClient.java CSHandler.java --main=CommServer ../lib/lib-javax-xml-parsers.so --classpath=../xerces-2_6_2/xml-apis.jar:. -o CommServer


Perfect. However, when I run it, it gives me

-bash-2.05b$ ./CommServer
libgcj failure: Duplicate class registration: org.xml.sax.AttributeList
Aborted

I read some notes about this problem in the mailing list archives, however, I'm not sure what any of it means :P
Any thoughts?



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]