25 messages in net.java.dev.jna.usersRe: AW: [jna-users] JNA and Windows M...
FromSent OnAttachments
Novatchkov HristoFeb 26, 2009 2:14 am 
Timothy WallFeb 26, 2009 5:54 am 
Hristo NovatchkovFeb 27, 2009 4:11 pm 
Timothy WallFeb 27, 2009 7:21 pm 
Hristo NovatchkovFeb 28, 2009 3:03 am 
Timothy WallFeb 28, 2009 4:16 am 
Hristo NovatchkovFeb 28, 2009 4:30 am 
Timothy WallFeb 28, 2009 5:17 am 
Novatchkov HristoMar 4, 2009 3:06 am 
Novatchkov HristoMar 4, 2009 8:13 am 
Timothy WallMar 4, 2009 8:38 am 
Novatchkov HristoMar 5, 2009 12:19 am 
Novatchkov HristoMar 5, 2009 12:59 am 
Timothy WallMar 5, 2009 8:24 am 
Novatchkov HristoMar 10, 2009 7:42 am 
Timothy WallMar 10, 2009 8:21 am 
Novatchkov HristoMar 11, 2009 2:02 am 
Timothy WallMar 11, 2009 5:11 am 
Novatchkov HristoMar 11, 2009 5:56 am 
Timothy WallMar 11, 2009 6:03 am 
Hristo NovatchkovMar 15, 2009 9:05 am 
Timothy WallMar 15, 2009 12:09 pm 
youc...@free.frMar 16, 2009 3:51 am 
Novatchkov HristoMar 16, 2009 4:00 am 
Timothy WallMar 16, 2009 6:17 am 
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: AW: [jna-users] JNA and Windows MobileActions...
From:Timothy Wall (twal@dev.java.net)
Date:Mar 15, 2009 12:09:15 pm
List:net.java.dev.jna.users

Depends on your VM and/or class loader. Sun keeps its native libraries in a List of objects with a "name" field which identifies the file path of the native library. JNA explicitly invokes the finalize method on that object to force it to unload the JNA native library. Look at your VM's classloader source to see how it handles loadLibrary calls.

If the JNA dll is found in your PATH, you won't have to worry about deleting the temporary one.

On Mar 15, 2009, at 12:06 PM, Hristo Novatchkov wrote:

Hello, what would be the method that has to be called in order to unload the dll? Thanks!

Timothy Wall schrieb:

In order to delete the temporary dll extracted from jna.jar, the VM must exit so that windows no longer thinks the file is in use. There is a hack to attempt to unload the dll prior to VM exit, but it's only reliable on Sun VMs. If the hack fails, a new VM is launched with instructions to delete the temporary file.

On Mar 11, 2009, at 8:57 AM, Novatchkov Hristo wrote:

I see - I have tried to contact some of the people (I got their e- mails from different forums) that have been trying to use JNA on Windows Mobile, though, I haven't got any reply till now. Can you probably send me any contact information of some guys that have been dealing with that issue?

Right now, I'm using Eclipse under Windows XP in order to develop and run my program. Strangely enough, after running the program (in which I use JNA) and then closing it, I get the following error:

java.io.IOException: (2) Das System kann die angegebene Datei nicht finden. at com.ibm.oti.lang.SystemProcess.create(SystemProcess.java:130) at java.lang.Runtime.exec(Runtime.java:99) at java.lang.Runtime.exec(Runtime.java:69) at java.lang.Runtime.exec(Runtime.java:43) at com.sun.jna.Native$DeleteNativeLibrary.run(Native.java:761)

The German sentence "Das System kann die angegebene Datei nicht finden." means that the system is not able to find the specified file. So this problem occurs every time AFTER exiting the application. What could be the reason for that?

Thanks and regards, Hristo