JNI and nested class

V

vahania63

I am having problem with JNI. I am not new to JNI and used it quite
extensively before. The only difference is that now I defined native
function in the nested class. When I run the software I get
'UnsatisfiedLinkError' when I call this function. At the same time if
I put this function back into the outer class everything is fine.

Do you have any idea why is that? Just in case I use Linux Fedora Core
4, Sun JDK 1.5, update 7.

Thanks
 
G

Gordon Beaton

I am having problem with JNI. I am not new to JNI and used it quite
extensively before. The only difference is that now I defined native
function in the nested class. When I run the software I get
'UnsatisfiedLinkError' when I call this function. At the same time
if I put this function back into the outer class everything is fine.

Did you run javah using the fully qualified name of the nested class,
and then update the source using the new generated function names? Do
you call System.loadLibrary() from the nested class?

/gordon

--
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,680
Members
48,796
Latest member
Greg L.

Latest Threads

Top