This week's book giveaway is in the Jython/Python forum.
We're giving away four copies of Hands On Software Engineering with Python and have Brian Allbey on-line!
See this thread for details.
Win a copy of Hands On Software Engineering with Python this week in the Jython/Python forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Bear Bibeault
  • Knute Snortum
  • Liutauras Vilda
Sheriffs:
  • Tim Cooke
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Tim Moores
  • Frits Walraven
  • Ron McLeod
  • Ganesh Patekar
  • salvin francis
Bartenders:
  • Tim Holloway
  • Carey Brown
  • Stephan van Hulst

UnsatisfiedlinkError  RSS feed

 
Ranch Hand
Posts: 52
Java Oracle Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello friends,
I compiled the c code and made a .dll file. Now I am trying to load it using the System.load(path); here path is the absolute path to .dll file I made using the JNI, but it is giving me an UnsatisfiedLinkError with many other things in the browser. To be honest I don't what it means except that UnsatisfiedLinkError. One more thing when I used the System.loadLibrary(name), here name is the name of the .dll that I am loading in my program with the .c, .java and .class all in the same directory it is running well and shows the desired output. Now I changed the directory of th e .dll file. Can any one tell me where I made mistake.
 
Bartender
Posts: 1558
5
Eclipse IDE Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Swapnil Sanghai,

Please CarefullyChooseOneForum. I doubt if this question is related with SCJP/OCPJP.

You can request forum moderator to move the post to appropriate forum, or wait till someone moves it. Please do not start another thread on different forum.
 
Java Cowboy
Posts: 16084
88
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
UnsatisfiedLinkError means that Java cannot find your DLL.

Define a system property named java.library.path that points to the directory that contains the DLL. You can do that on the command line with the -D option when you start your program, for example like this:

java -Djava.library.path=C:\MyProject\MyDllDir com.mypackage.MyProgram
 
Montana has cold dark nights. Perfect for the heat from incandescent light. Tiny ad:
RavenDB is an Open Source NoSQL Database that’s fully transactional (ACID) across your database
https://coderanch.com/t/704633/RavenDB-Open-Source-NoSQL-Database
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!