[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[news.eclipse.tools.jdt] UnsatisfiedLinkError when invoking native method from non-default pkg

My config: Eclipse 3.1M5, JRE 1.4.2.07 + WTP, Win xp.

I created a project with a default pkg and added a java file that invokes a native method (sayHello) found in a C-dll. This works fine.

When I move the java file to some other pkg and run the executable there, then I start getting :

java.lang.UnsatisfiedLinkError: sayHello.

The library seems to load because if I remove the dll I'll get a different UnsatisfiedLinkError. For some reason the method can't be resolved from a pkg that is not the default pkg.

The header file for the native method was generated using javah and the signature of the native method follows the convention Java_classname_methodname.

Any ideas as to why moving the java file from the default pkg to a different pkg causes the native method to go unresolved?

Thanks in advance.
Chan.