• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Using JNA in web application

 
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic