• 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
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Using JNA in web application

 
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello, ranchers!

Can you please tell me, if it is possible to use JNA in a web application? I can successfully use JNA to access various DLLs in a console application, but still did not manage to work with it in some servlet container, it always gives me java.lang.UnsatisfiedLinkError: Unable to load library error. What must be done to get it working?

My application is built using maven. I am trying to run it on Windows platform, and the native library is loaded using the following code fragment:



The native library (g95java.dll) is in "other sources" folder of maven project.

Unfortunately, this aspect of JNA (web development) is almost not documented.

And, by the way, is there any other way to call DLLs in web application, except JNA?

Thank you in advance!
 
Vasily Kukhta
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I finally found the solution of the problem - just copied all required DLLs to the shared and external libraries folder of the application server, and everything is working now. Very simple.
 
Come have lunch with me Arthur. Adventure will follow. This tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic