Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

jsp - jar - dll

 
moshi cochem
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic