and check your jar contains the correctly named dll
Main Topics
Browse All TopicsI am using Java 6 Update 16.
I have an applet from which I would like to access code in a DLL (natives-1.1.dll). The applet is launched via JNLP and is a true applet that runs inside the browser. I have put the DLL into a JAR (natives-1.1.jar) and signed the JAR and also signed the applet's JAR with the same certificate. I have included a <nativelib> element in the JNLP. However, when I try to load the library inside the applet I get an UnsatisfiedLinkError:
Validating http://localhost:8080/test
Validating http://localhost:8080/test
Exception in thread "thread MyApplet-2" java.lang.UnsatisfiedLinkE
at java.lang.ClassLoader.load
at java.lang.Runtime.loadLibr
at java.lang.System.loadLibra
at MyApplet$1.run(MyApplet.ja
at java.security.AccessContro
at MyApplet.init(MyApplet.jav
at sun.plugin2.applet.Plugin2
at java.lang.Thread.run(Unkno
So as you can see, it's definitely downloading the JAR containing the DLL.
The code in the applet to load the library looks like this:
AccessController.doPrivile
public Object run() {
try {
System.loadLibrary("native
} catch (Exception e) {
}
return null;
}
});
and the relevant JNLP entry looks like this:
<resources os="Windows" arch="x86">
<nativelib href="natives-1.1.jar" download="eager"/>
</resources>
I am only running on a Windows x86 machine at the moment so it should work and it's definitely being downloaded as above.
Can someone tell me why the DLL is not being found?
Thanks,
KP
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Business Accounts
Answer for Membership
by: objectsPosted on 2009-08-22 at 20:23:44ID: 25161236
jnlp is used for loading applications, not applets so my guess is the jnlp is not getting loaded.
How are you loading the applet?