• 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
  • Liutauras Vilda
  • Tim Cooke
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • paul wheaton
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Tim Holloway
  • Carey Brown
  • salvin francis

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.
 
You get good luck from rubbing the belly of a tiny ad:
professionally read, modify and write PDF files from Java
https://products.aspose.com/pdf/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!