i am using some classes which were written to be executed by a web
service and am trying to use them in a test application which will use
a simple main method.
the class am trying to use has a
and then has a number of native methods which i asume are all stored
each time i attempt to execute any the native methods i get:
Exception in thread "main" java.lang.UnsatisfiedLinkError:
i have tried using dependencywalker application make sure i have all
the dependent dll's and from what i can see they are all stored in my
system32 directory, i have made sure my PATH variable has this
directory as well so it isnt that, and anyway it doesnt through an IO
error so it must actually find the dll.
ANY IDEAS would be really great
thanks in advance
On 18 Sep 2006 12:33:38 -0700, ba.hons wrote:
> each time i attempt to execute any the native methods i get:
> Exception in thread "main" java.lang.UnsatisfiedLinkError:
Just to confirm: you get no exception when you load the DLL, you get
the exception when you attempt to invoke one of the methods?
If that's the case, then the JVM is unable to find the methods it
expects to find in the DLL.
Note that the DLL was necessarily written to be used from a particular
Java class. That class declares a number of native methods, and the
DLL contains implementations of those methods. You cannot load the
same DLL from another class and expect to be able to use those methods
as though they belonged to the new class, because the method names in
the DLL are determined (in part) by the name of the class they belong
Did you rename the class the dll was intended to be used from? Did you
change its package declaration?
If any of this is unclear to you, then post some real code (not just
an abstract example).
[ don't email me support questions or followups ]
g o r d o n + n e w s @ b a l d e r 1 3 . s e
YOUR A STAR !!!
i had changed the package name and that was causing the problem, really
thanks for the help i think i would have been here all night !!