• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

JNI Problem -Help!

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 67
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Kailas,
Try the following:
instead of System.loadLibrary("yourDLL");
try using System.load("C:/path/to/your/yourDLL.dll");
 
This will take every ounce of my mental strength! All for a tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic