WinDef.DWORD is broken in 3.4.0 ?

195 views
Skip to first unread message

Sudhish U

unread,
Jun 6, 2012, 9:48:38 AM6/6/12
to Java Native Access
Hi,

I am a newbie to JNA. I could be wrong but this is what i see - while
trying to use -

CreateToolhelp32Snapshot( WinDef.DWORD, WinDef.DWORD) method,
got the following error. -

Exception in thread "main" java.lang.NoSuchMethodError:
com.sun.jna.IntegerType.<init>(IJZ)V
at com.sun.jna.platform.win32.WinDef$DWORD.<init>(WinDef.java:57)

Found that even trying to create a WinDef.DWORD by DWORD = new
DWORD() is failing with the same exception.
Looking at the source, i could not find a matching constructor for
com.sun.jna.IntegerType which accepts a long and boolean, as passed by
the DWORD initialization.

Pardon me if i have missed something here..

Thanks and regards,
Sudhish.

Timothy Wall

unread,
Jun 6, 2012, 6:47:18 PM6/6/12
to jna-...@googlegroups.com
You have a JNA version mismatch. Unsigned IntegerType was added in 3.4.1.

Sudhish U

unread,
Jun 6, 2012, 7:47:08 PM6/6/12
to Java Native Access
Thank you so much for the reply. But now i am a bit confused. I am
using platform.jar version 3.4.0 with jna.jar version 3.4.0. Are you
saying that they are not compatible with each other in this case, and
i should use jna-3.4.1.jar with plaform-3.4.0.jar ? If yes, that is
fine but how do i get jna-3.4.1.jar ? because version 3.4.0 is the
latest i could get at https://github.com/twall/jna/downloads.

Timothy Wall

unread,
Jun 6, 2012, 9:05:37 PM6/6/12
to jna-...@googlegroups.com
if the platform.jar listed for download under 3.4.0 is not actually the claimed version, then that's an issue that needs to be addressed.

Sudhish U

unread,
Jun 7, 2012, 9:23:03 PM6/7/12
to Java Native Access
Yes, to me, it looks something like that. WinDef.DWORD from
platform-3.4.0.jar is not working with jna-3.4.0.jar, apparently due
to an incompatibility in method signature.

Is there a confirmation from anybody else that this issue do exist ?

Timothy Wall

unread,
Jun 8, 2012, 7:25:29 AM6/8/12
to jna-...@googlegroups.com
I've changed the download link for the platform jar to point directly at the git repo. I'll check against a w32 setup when I get a chance.

Farkas Levente

unread,
Jun 8, 2012, 8:16:17 AM6/8/12
to jna-...@googlegroups.com, Timothy Wall
does it means 3.4.1 released? or it's just a snapshot of the current git?
--
Levente "Si vis pacem para bellum!"

Timothy Wall

unread,
Jun 8, 2012, 8:51:04 AM6/8/12
to jna-...@googlegroups.com
3.4.1 has been tagged. anyone who values a maven release is welcome to help push that out (I'm clueless about how to properly do a multi-stage deploy, and would rather buy a clue than spend the time searching for one).
Reply all
Reply to author
Forward
0 new messages