Re: [Java-gnome-developer] Problems running programs
Brought to you by:
afcowie
From: Clint A. <ca...@au...> - 2005-03-08 14:08:14
|
Bruno Dusausoy said: > Hi, > > I must be the dumbest man in the world but I cannot compile/run any Java-Gnome program, whether it's with Eclipse or not ! I don't think so, just uninformed. ;-) [snip] > My CLASSPATH is as follows : > > bdusauso@Tu-144:~/workspace/First$ echo $CLASSPATH > /usr/lib/j2se/1.4/jre/lib/rt.jar:/usr/share/java:. Here is your first problem. When adding .jar files to your classpath, you must specify each file individually, like this: /usr/share/java/gtk2.4.jar:/usr/share/java/gnome.jar:...etc. Putting just /usr/share/java won't work. Fix this and you'll fix the majority of your problems. [snip] > Another problem is when running Eclipse. I've set it up like shown in > > http://java-gnome.sourceforge.net/cgi-bin/bin/view/Main/EclipseDevelopment > > But, when running, Eclipse tells me : > > Exception in thread "main" > java.lang.UnsatisfiedLinkError: /usr/lib/jni/libgnomejava2.8.so.2.8.2: libgtkjava2.4.so: cannot open shared object file: No such file or directory > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1586) > at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1511) > at java.lang.Runtime.loadLibrary0(Runtime.java:788) > at java.lang.System.loadLibrary(System.java:834) > at org.gnu.gnome.Program.<clinit>(Program.java:74) > at First.main(First.java:22) > > This one is more tricky to figure out, but easy to fix. In Eclipse, open up the Run... dialog and click on the Environment tab. Click the New button to add a new environment variable: Name: LD_LIBRARY_PATH Value: /usr/lib/jni That should do it. Write back if you have more problems. |