This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
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


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "JNI Problem -Help!" Watch "JNI Problem -Help!" New topic
Author

JNI Problem -Help!

kailas simha
Greenhorn

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(MyWorld.java:12)
Thanks in advance,
Kailas
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="http://www.orderware.net" target="_blank" rel="nofollow">http://www.orderware.net</a>
Servin Park
Greenhorn

Joined: May 10, 2002
Posts: 26
Kailas,
Try the following:
instead of System.loadLibrary("yourDLL");
try using System.load("C:/path/to/your/yourDLL.dll");
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JNI Problem -Help!
 
Similar Threads
EJB and JNI in JBOSS
Microsoft's Cards.dll
UnsatisfiedLinkError with JNI in jdk1.2
pros and cons of JNI
pros and cons of JNI