File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Java in General and the fly likes JNI Problem -Help! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "JNI Problem -Help!" Watch "JNI Problem -Help!" New topic

JNI Problem -Help!

kailas simha

Joined: May 29, 2002
Posts: 5
I am trying some examples on JNI but an stuck with this problem. Running on Win NT 4.0 with Dev-C++. (Have Cygwin also).
Can somebody help!!
When I run my java class file, I get this exception. What am I doing wrong here?
Exception in thread "main" java.lang.UnsatisfiedLinkError: print
at MyWorld.print(Native Method)
at MyWorld.main(
Thanks in advance,
Karl Laird
Ranch Hand

Joined: Jul 14, 2001
Posts: 67
this could be caused by many problems including problems in the javah header file, no header file, not being able to find the C dll, etc.
Can you post your java code, c header file and c code - this would make debugging alot easier

The Eagle sneers at the Peacock<p>Systems Administrator<br />OrderWare Solutions Ltd<br /><a href="" target="_blank" rel="nofollow"></a>
Servin Park

Joined: May 10, 2002
Posts: 26
Try the following:
instead of System.loadLibrary("yourDLL");
try using System.load("C:/path/to/your/yourDLL.dll");
I agree. Here's the link:
subject: JNI Problem -Help!
It's not a secret anymore!