Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / September 2006

Tip: Looking for answers? Try searching our database.

java.lang.UnsatisfiedLinkError

Thread view: 
ba.hons - 18 Sep 2006 20:33 GMT
Hello,

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

System.loadLibrary("thedll");

and then has a number of native methods which i asume are all stored
within "thedll"

each time i attempt to execute any the native methods i get:

Exception in thread "main" java.lang.UnsatisfiedLinkError:
theMethodAmCalling

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

ADAM
Gordon Beaton - 18 Sep 2006 21:05 GMT
> each time i attempt to execute any the native methods i get:
>
> Exception in thread "main" java.lang.UnsatisfiedLinkError:
> theMethodAmCalling

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
to.

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).

/gordon

Signature

[ 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

ba.hons - 18 Sep 2006 21:30 GMT
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 !!

Adam


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.