Re: [Java-gnome-developer] Executing examples
Brought to you by:
afcowie
From: Hurlin <sm...@in...> - 2004-10-11 21:18:40
|
I tried to set both classpath and location of native part of the libraries but it didn't work : smelc$ CLASSPATH=/usr/share/java/gtk2.4.jar:/usr/share/java/gnome2.6.jar smelc$ javac First.java smelc$ LD_LIBRAY_PATH=/usr/lib/jni/ smelc$ java First Exception in thread "main" java.lang.NoClassDefFoundError: First smelc$ java -Djava.library.path=/usr/li/jni First Exception in thread "main" java.lang.NoClassDefFoundError: First And i think, i have all the files required : smelc$ ls /usr/lib/jni/ libgconfjar2.6.so libgnomejava2.6.so.2.6.0 libgtkjava2.4.so libgconfjar2.6.so.2.6.0 libgnomevtejar0.11.so libgtkjava2.4.so.2.4.0 libgconfjava2.6.so libgnomevtejar0.11.so.0.11.10 libqtjava.la libgconfjava2.6.so.2.6.0 libgnomevtejava0.11.so libqtjava.so libgladejar2.6.so libgnomevtejava0.11.so.0.11.10 libqtjava.so.1 libgladejar2.6.so.2.6.0 libgtkhtmljar2.6.so libqtjava.so.1.0.0 libgladejava2.6.so libgtkhtmljar2.6.so.2.6.0 libswt-gtk-2136.so libgladejava2.6.so.2.6.0 libgtkhtmljava2.6.so libswt-pi-gtk-2136.so libgnomejar2.6.so libgtkhtmljava2.6.so.2.6.0 libxmlj-0.99.so libgnomejar2.6.so.2.6.0 libgtkjar2.4.so libxmlj.so libgnomejava2.6.so libgtkjar2.4.so.2.4.0 :-/ > On Mon, Oct 11, 2004 at 07:44:58PM +0200, Hurlin Cl?ment wrote: > > java -Djava.library.path=/usr/lib/jni/ First > > > > Exception in thread "main" java.lang.NoClassDefFoundError: > > org/gnu/gnome/Program > > at First.main(First.java:10) > > This is caused by not having the gnome jar in your classpath. You need both > the classpath set correctly so java finds the java libraries and the > LD_LIBRARY_PATH (-D) setting so that they can find the native part of the > libraries. |