Re: [Ikvm-developers] How to use the JNA through IKVM?
Brought to you by:
jfrijters
From: Volker B. <vol...@go...> - 2010-11-15 20:01:10
|
If you want use native method access then you need also the native part of IKVM. It is in the bin-x64 or bin-x86 directory. It depends on your platform. Also it can be a good idea to add all dll of IKVM as reference if you have such problems. If you have it working then you can remove the dlls that you not need. And test if it anyway run. Volker > -----Ursprungliche Nachricht----- > Von: bijuishere [mailto:bij...@me...] > Gesendet: Montag, 15. November 2010 20:47 > An: ikv...@li... > Betreff: Re: [Ikvm-developers] How to use the JNA through IKVM? > > > Thank you for the response Volker. I was wishing that it was > simple "you are > missing this" issue and kept the details away. Please see the > details below > > I am using IKVM version 0.44.0.5 > I obtained version 3.2.7 jna.jar from the java.net and it > converted into the > dll using the command "ikvmc -debug -target:library jna.jar > -version:1.0.0.0" > > The error I get is "The type initializer for > 'com.sun.jna.Structure' threw > an exception." and the inner exception is {"The type initializer for > 'com.sun.jna.Native' threw an exception."} > Stack Trace > > Stack Trace (JNAWrapper.GUID is my test class ) > at com.sun.jna.Structure.__<clinit>() > at JNAWrapper.GUID..cctor() > > I have references to these dlls in .net (framework 2.0, VS 2005) > IKVM.OpenJDK.Core.dll > IKVM.Reflection.dll > IKVM.Runtime.dll > IKVM.Runtime.JNI.dll > > Please let me know if anymore details are required. > > > > bijuishere wrote: > > > > Greetings. > > I am trying to convert a java app that uses JNA to read HID > devices. I > > have converted the JNA.jar file to a .net dll and has a simple test > > harness (jar) that just reads the HID class from the system. After > > converting this test harness to .net I am accessing both > dlls from .net > > after adding the necessary ikvm libraries. > > > > The operation fails throwing a type initialize error for the > > java.jna.native class. Can anyone please advise on what I > am doing wrong > > here? Am I on a totally wrong direction here? > > Any help is greatly appreciated. Thanks in advance > > > > > > -- > View this message in context: > http://old.nabble.com/How-to-use-the-JNA-through-IKVM--tp30215 > 523p30222316.html > Sent from the IKVM .NET - Dev mailing list archive at Nabble.com. > > > -------------------------------------------------------------- > ---------------- > Centralized Desktop Delivery: Dell and VMware Reference Architecture > Simplifying enterprise desktop deployment and management using > Dell EqualLogic storage and VMware View: A highly scalable, end-to-end > client virtualization framework. Read more! > http://p.sf.net/sfu/dell-eql-dev2dev > _______________________________________________ > Ikvm-developers mailing list > Ikv...@li... > https://lists.sourceforge.net/lists/listinfo/ikvm-developers > |