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 / December 2006

Tip: Looking for answers? Try searching our database.

java.lang.UnsatisfiedLinkError while calling native function

Thread view: 
sonijindal@gmail.com - 06 Dec 2006 13:39 GMT
Hi,

I have a shared library that I am trying to load, but i am getting
java.lang.UnsatisfiedLinkError when it is trying to call the native
function.

One thing I noticed was the weird header file name. The name of the
package which contains the .java file is com.motorola.stv . But when I
am doing javah , the .h file which is created is by the name
com_0002fmotorola_0002fstv_0002fStvUaMgr.h . I am not sure why the name
contains those numbers. I am using j2sdk1.4.2_12.

I was wondering if anyone could help.

Thanks,
Sonika
Gordon Beaton - 06 Dec 2006 14:49 GMT
> One thing I noticed was the weird header file name. The name of the
> package which contains the .java file is com.motorola.stv . But when I
> am doing javah , the .h file which is created is by the name
> com_0002fmotorola_0002fstv_0002fStvUaMgr.h . I am not sure why the name
> contains those numbers. I am using j2sdk1.4.2_12.

I appears that an incorrect javah command was used to generate the
file, using slash (/) to separate components instead of dot (.).

Run javah like this, specifying the fully-qualified classname:

 javah com.motorola.stv.StvUaMgr

Then make sure the method names in the C source match those in the
generated header file.

/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

sonijindal@gmail.com - 08 Dec 2006 04:26 GMT
Hi Gordon,

Thanks a lot. The solution you gave , worked !!

Regards,
Sonika

> > One thing I noticed was the weird header file name. The name of the
> > package which contains the .java file is com.motorola.stv . But when I
[quoted text clipped - 17 lines]
> [ 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


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.