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.
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.