5 messages in net.java.dev.jna.usersRe: [jna-users] JNLPAppletlauncher Issue
FromSent OnAttachments
Patrick FlahertySep 6, 2008 11:12 am 
Timothy WallSep 6, 2008 2:40 pm 
Daniel KaufmannSep 7, 2008 9:33 am 
Patrick FlahertySep 11, 2008 5:41 pm 
Timothy WallSep 11, 2008 6:23 pm 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Re: [jna-users] JNLPAppletlauncher IssueActions...
From:Timothy Wall (twal@dev.java.net)
Date:Sep 6, 2008 2:40:28 pm
List:net.java.dev.jna.users

I believe you can work around this (at least on windows) by having JNA first load the main dll, or in general loading dependent dlls first.

You might be able to play tricks using windows library loading APIs (see LoadLibrary docs for references).

On Sep 6, 2008, at 2:12 PM, Patrick Flaherty wrote:

Hi,

We are using JNLPAppletlauncher to download a dll along with our bridge dll which acts as the bridge to the methods in the main dll. The bridge methods are called from java. We are using JNA to load the bridge dll and we get an UnsatisfiedLinkError. This error is due to fact that tha main dll is a dependency of the bridge dll, but for some reason the main dll cannot be located.

The exception is Exception in thread "Thread-27" java.lang.UnsatisfiedLinkError: Unable to load library C:\Users\Me\AppData\Local\Temp\jnlp-applet \jln12362\jln12364\bridge.dll': The specified module could not be found.

Now both the bridge dll AND the main dll are in the folder C:\Users \Me\AppData\Local\Temp\jnlp-applet\jln12362\jln12364. The reason I know the error is based on finding the dependecy (main.dll) is because if I put a copy on main.dll in a location in the Windows Path (%PATH%), then everything runs fine. I would just copy the main dll into C:\Windows\System32 and be done with it, but because this is Vista, I get the following exception during the copy :

java.io.IOException: Access is denied at java.io.WinNTFileSystem.createFileExclusively(Native Method) at java.io.File.createNewFile(Unknown Source)

Can anyone offer any help here, it seems as if the call to load library in JNA finds the bridge.dll but from there you are now in native space (Windows process space) and the dependecy dll can only be found in the Windows Path and not the java.library.path.

There are no other dependencies, as evidence by my putting a copy of just main.dll into a location in the Windows Path.

Thanks in advance. -T