Skip to main content

Ralsina.Me — Roberto Alsina's website

A simple question

I was try­ing to do some­thing weird: take one of my PyQt prog­gies, and com­pile it in­to a stand­alone bi­na­ry us­ing Jython, koala/qt­ja­va and gjc.

Sad­ly, it does­n't work :-(

Has any­one ev­er got­ten a rather re­cent gjc and jython to work to­geth­er?

The best I can get is this:

[ralsina@monty jython]$ gcj -fjni /usr/lib/lib-org-*.so.* --classpath=/usr/java/j2sdk1.4.2_08/jre/lib/ --main=org.python.util.jython /usr/share/java/dom3-xerces-j2.jar /usr/share/java/ant.jar /usr/share/java/servlet.jar /usr/share/java/oro.jar /usr/share/java/jython.jar  -o jython
org/apache/html/dom/HTMLAnchorElementImpl.java:0: error: cannot find file for class   org.w3c.dom.events.EventTarget
org/apache/html/dom/HTMLAnchorElementImpl.java:0: error: cannot find file for class org.w3c.dom.TypeInfo
org/apache/html/dom/HTMLAnchorElementImpl.java:0: error: cannot find file for class org.w3c.dom.html.HTMLElement
org/apache/html/dom/HTMLAnchorElementImpl.java:0: error: cannot find file for class org.w3c.dom.html.HTMLAnchorElement
org/apache/html/dom/HTMLAnchorElementImpl.class:0: confused by earlier errors, bailing out

This is us­ing gc­c-­java-3.4.3-22.1 and jython-2.2-0.a0.2jpp

I mean, this is com­plete­ly un­nec­es­sary, but it would be a nice hack :-)

Michael Greifeneder / 2006-04-04 01:38:

I suppose either



ant.jar

oro.jar



has references to xerces 1.4.4



However you have added dom3-xerces-j2.jar. That's version 2 of xerces. You can try to download xerces 1.4.4 from http://xml.apache.org/dist/xerces-j/



Or I would prefer download latest versions of Ant and/or Oro.

http://ant.apache.org/bindownload.cgi and

http://jakarta.apache.org/site/downloads/downloads_oro.cgi



Good luck



Mike


Tom Tromey / 2006-04-04 01:39:

With 3.4, the rule is that if you compile a library

you must also compile and link in all its dependencies.



If you can use 4.x, you can switch to the new

"binary compatibility ABI", which is a bit

more friendly here.



I haven't tried jython in a while myself, but

it worked for a long time.


Contents © 2000-2020 Roberto Alsina