• 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

jsp - jar - dll

 
Ranch Hand
Posts: 91
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I'm using eclipse to develope a java application.
There is a dll that located in my Java project.
I have a class that uses this dll.
I createf a jar file out of this Java project.
When creating the Jar, there is a "jar file specification" window, in which we choose all of the files we want to be included in the jar. I selected there also that dll file that one of the classes has to use. The jar, as you cas understand, has to contain the dll file and knows how to use it.

My goal is to invoke a method in the jar thru jsp file. The jar is located in the "lib" folder of a web application. (also developed by eclipse).
Basically, the jar is running Ok being called thru the jsp.
The problem occures when the jsp call a method in the jar file, while this method is initializing an instance of a class that uses that dll (the dll I told about above).

jsp - > jar's method - > new class that uses the dll - > Exception

The dll's name if HASPJava, and the exception I get is:

java.lang.UnsatisfiedLinkError: no HASPJava in java.library.path

I inserted the HASPJava.dll into the "lib" folder in the web project, so that the jsp file should recognize it, but maybe I have to do it in another way. Maybe in the class path or something... maybe in the manifest of the jar...

Thanks for any advice.
 
Always! Wait. Never. Shut up. Look at this tiny ad.
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic