Re: [Java-gnome-developer] Executing examples
Brought to you by:
afcowie
From: Rishabh M. <rma...@gm...> - 2004-10-11 21:43:09
|
you need to export the classpath and the LD_LIBRARY_PATH.=20 after: smelc$ CLASSPATH=3D/usr/share/java/gtk2.4.jar:/usr/share/java/gnome2.6.jar you need to do: export CLASSPATH and the same with the LD_LIBRARY_PATH. May I suggest adding these two to your .bashrc/.profile so that you dont need to do this for every new session. --Rishabh On Mon, 11 Oct 2004 23:20:25 +0200, Hurlin Cl=E9ment <sm...@in...> wrote= : > I tried to set both classpath and location of native part of the librarie= s but > it didn't work : >=20 > smelc$ CLASSPATH=3D/usr/share/java/gtk2.4.jar:/usr/share/java/gnome2.6.ja= r > smelc$ javac First.java > smelc$ LD_LIBRAY_PATH=3D/usr/lib/jni/ > smelc$ java First > Exception in thread "main" java.lang.NoClassDefFoundError: First > smelc$ java -Djava.library.path=3D/usr/li/jni First > Exception in thread "main" java.lang.NoClassDefFoundError: First >=20 > And i think, i have all the files required : >=20 > smelc$ ls /usr/lib/jni/ >=20 > libgconfjar2.6.so libgnomejava2.6.so.2.6.0 libgtkjava2.4.s= o > 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 >=20 > :-/ >=20 >=20 >=20 >=20 > > On Mon, Oct 11, 2004 at 07:44:58PM +0200, Hurlin Cl?ment wrote: > > > java -Djava.library.path=3D/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 t= he > > libraries. >=20 > ------------------------------------------------------- > This SF.net email is sponsored by: IT Product Guide on ITManagersJournal > Use IT products in your business? Tell us what you think of them. Give us > Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out mo= re > http://productguide.itmanagersjournal.com/guidepromo.tmpl > _______________________________________________ > java-gnome-developer mailing list > jav...@li... > https://lists.sourceforge.net/lists/listinfo/java-gnome-developer > |