On 1.4.2013 11.44, "Xiaofan Chen" <xiaof...@gmail.com> wrote:
>
>I do not know much about Java but I do not quite
>understand your "pure Java" terminology.


Pure Java was Sun's marketing catch phrase to promote
programs/programming that required not other code
than Java code (besides what was included with the standard
Java Virtual Machine of course).



>
>Anyway, as per Wiki, the native library will still be
>requred, right?

Well, yes and no, as if you call the standard OS API libraries
they are part of the operating system and thus are
always there. So yes, of course you need native libs, but
no, you do not need to distribute them or install them
as they are part of the OS.

JNA of course has some internal native code for each
platform so it is a bit dishonest to say any solution
based on JNA is Pure Java but it is so well maintained
and cleverly implemented that all you need is a single
jna.jar on your classpath to make it work, so it looks
like Pure Java for the casual observer.

>
>Like this? The code seems to be a bit old though.
>https://github.com/setter/hid4j


>From the quick look this looks like Linux only
and it does:

LibHID libHID = (LibHID) Native.loadLibrary("hid-0.5.2", LibHID.class);



so it presumes that a 'hid' library (whatever it is) is present
and I would expect that this is something that needs to be
installed, which is not what I want. I think and hope
that there is a way to use HID devices directly using
the OS API on each platform, like IOKit in Mac OS X.

>
>Or this one?
>https://github.com/BodyTrack/AirBot-Uploader/tree/master/java/lib/HIDAPI

No, again this relies on native HIDAPI being present and
the comments on that page clearly illustrate problem with
this approach:

"I don't have a Mac with OS X 10.5.x on it anymore,
so I couldn't create the libhidapi32.dylib."

Kind of proves the point, eh...

br Kusti


This e-mail may contain confidential or privileged information. If you are not 
the intended recipient (or have received this e-mail in error) please notify 
the sender immediately and destroy this e-mail. Any unauthorized copying, 
disclosure or distribution of the material in this e-mail is strictly 
forbidden. We will not be liable for direct, indirect, special or consequential 
damages arising from alteration of the contents of this message by a third 
party or as a result of any virus being passed on or as of transmission of this 
e-mail in general.

------------------------------------------------------------------------------
Own the Future-Intel&reg; Level Up Game Demo Contest 2013
Rise to greatness in Intel's independent game demo contest.
Compete for recognition, cash, and the chance to get your game 
on Steam. $5K grand prize plus 10 genre and skill prizes. 
Submit your demo by 6/6/13. http://p.sf.net/sfu/intel_levelupd2d
_______________________________________________
libusbx-devel mailing list
libusbx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libusbx-devel

Reply via email to