help needed loading a jar file and dll file

B

Barry

Hello,

I hope somebody can help me with the following problem.

My application requires a jar file be loaded dynamically at runtime,
which I do using a URLClassLoader. However, the classes within the
jar are dependent on a dll also being loaded. This I cannot do. An
UnsatisfiedLinkError is reported when classes obtained from the jar
calls methods found in the aforementioned dll. For example,

java.lang.UnsatisfiedLinkError: getMSRresults_SEC_PARAMETERS at
com.science.parser.ParserJNI.getMSResults_SEC_PARAMETERS(Native
Method) at
com.science.parser.MSResults.<clinit>(MSResults.java:230) at
sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at
java.lang.reflect.Constructor.newInstance(Constructor.java:274) at
com.micro.search.SearchResults.getResults(SearchResults.java:47)

I have tried loading the dll file using the System.load and
System.loadLibrary methods but to no avail. No exception is thrown in
either case. To add insult to injury, if I add the jar file to the
classpath everything works (unfortunately, for licensing reasons, I am
unable to add the jar file to the class path - otherwise I would be
laughing and this post would be redundant).

Any help you can give me will be much appreciated. Thank you.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,062
Latest member
OrderKetozenseACV

Latest Threads

Top