Re: [Java-gnome-developer] win32 java.lang.UnsatisfiedLinkError: gtk_init
Brought to you by:
afcowie
From: Ka-Hing C. <ka...@gm...> - 2005-03-08 07:40:24
|
On Tue, 08 Mar 2005 06:54:11 +0000, Simon Godden <si...@sg...> wrote: > I don't think so. If you run the java command from a MS-DOS prompt, > then it tells you about any missing DLL dependency that it cannot load, > and there are no such messages. > > As it is Java that is throwing the unsatisfied link error, I believe it > must be the definition of a native method that it cannot find, i.e. > something within the gtkjni-2.4.dll itself, as suggested by a previous > post. Perhaps java cannot load gtkjni-2.4.dll because gtkjni-2.4.dll references gtk_init, which is contained in one of the GTK dlls, and since java cannot find the GTK dlls, you get the unsatisfied link error. > If it had successfully found the native method and the problem was > something the native method itself was calling, I don't think I would > get a UnsatisfiedLinkError, because it would be out of the JVM's hands > by then. I haven't done much JNI, but as I recall java throws UnsatisfiedLinkError when what I described above happens. It may also throw the same exception under other conditions though. Getting native libraries to load is not what I would call fun... -khc |