[Java-gnome-developer] Listener implementation question
Brought to you by:
afcowie
From: Nicholas R. <ni...@mn...> - 2004-10-29 10:22:21
|
I'm trying to add some extra listener functionality to libgtkhtml-java. I've added everything that would seem to me to be necessary, but i'm getting a NoClassDefFoundError and i'm not sure why. Perhaps someone can help me figure it out. I've added the REQUEST_URL event type to HTMLDocumentEvent class as well as adding the necessary handler method in HTMLDocument and registering it in the addEvents method and in the addListener method. This registration process seems to work fine since i don't get an error if there are no external files (images, css) referenced in my html page. However, if i add an <img> tag in the html page, i get this exception: Exception in thread "main" java.lang.NoClassDefFoundError: HtmlStream at org.gnu.gtkhtml.HTMLDocument.htm_document_write_stream(Native Method) at org.gnu.gtkhtml.HTMLDocument.writeStream(HTMLDocument.java:55) at org.gnu.gtkhtml.HTMLDocument.loadURL(HTMLDocument.java:130) at TestHTML.<init>(TestHTML.java:72) at TestHTML.main(TestHTML.java:29) "HtmlStream" is the name of the GTK "C" class that is passed as one of the arguments to the callback function in C. I have defined a Java class named "HTMLStream" which gets instantiated in the HTMLDocument's handler method via an int (pointer to the C HtmlStream object). However, the Java handler method never gets called (i have a println as the first statement in this method). So what i don't understand is why it's trying to find the Java class "HtmlStream" when this is the name of the GTK "C" class. Shouldn't it just pass the pointer to the HtmlStream object into the handler method via the int parameter and let me instantiate my "HTMLStream" class? thanks in advance for your help, Nick |