LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   Can't run java apps using gtk2.8 and glade2.13 (https://www.linuxquestions.org/questions/programming-9/cant-run-java-apps-using-gtk2-8-and-glade2-13-a-421503/)

qwerty 03-04-2006 05:58 AM

Can't run java apps using gtk2.8 and glade2.13
 
Hello,

I'm trying to develop a java application using Glade gui components. I'm using the gtk2.8 and glade2.13 libraries. The programs compile fine but when I run them I get the following error
Code:

Exception in thread "main" java.lang.NoClassDefFoundError: org/gnu/glib/Struct
        at gnomeApp.ExampleGNOME.main(ExampleGNOME.java:25)

Basically this is saying that the class, Struct, is missing from the gtk library. The line that causes this error is
Code:

Gtk.init(args);
Please can someone tell me how to fix this or where to get the Struct class from. Thanks

mrcheeks 03-05-2006 05:01 PM

are you sure you are not missing some glib libraries?

qwerty 03-08-2006 01:28 PM

I don't think so, I've followed the example at http://people.redhat.com/overholt/na...pse/index.html and this just uses the same two libraries I mentioned in the original post, albeit older versions.

Also, does anyone know whether I have to use a native java compiler rather than the sun one?

Thanks

qwerty 03-09-2006 07:22 AM

I've fixed the problem now. I'd tried installing all the relevent libraries from http://java-gnome.sourceforge.net/cg...n/GetJavaGnome however I found that for some reason it had installed everything to work with the native java runtime rather than the Sun one which I use. All I had to do was copy the relevant libraries into the Sun java directory and then two .so files as well. All fully working now.


All times are GMT -5. The time now is 01:51 PM.