d2jsp
Log InRegister
d2jsp Forums > Off-Topic > Computers & IT > Programming & Development > Read Usb Port In Java ? > Offer Up To 1k Fg
Add Reply New Topic New Poll
Member
Posts: 2,650
Joined: Nov 19 2005
Gold: 49,898.00
Aug 8 2012 04:25pm
Hello guys !!

I'm looking for some help here.

For a project, I have to read my USB Port, in Java.
To sum up, it's a domotic project, and I plug 2 usb transmitter, one X10 and one Z-WAVE.
But my problem is that I can't access to my COM/USB Port with my Windows 7/64 bits.
I don't want to use Linux or Windows XP.
And developping on Eclipse (nothing else)

Is there any one who can help me ?
I'm ready to send over 1k fg but I need this very quick.

Thanks
Regards
Member
Posts: 11,637
Joined: Feb 2 2004
Gold: 434.84
Aug 8 2012 05:31pm
Your best (and possibly only) bet is to write the USB stuff in native code and use JNI to bind it to your Java app.
Member
Posts: 4,605
Joined: Sep 15 2011
Gold: 9,464.00
Aug 8 2012 05:36pm
libusb
http://sourceforge.net/projects/libusbjava/

This post was edited by irimi on Aug 8 2012 05:37pm
Member
Posts: 11,637
Joined: Feb 2 2004
Gold: 434.84
Aug 8 2012 05:39pm
Quote (irimi @ Aug 8 2012 06:36pm)


Shit, I tried looking for something up to date and couldn't find it. Good one.
Member
Posts: 2,650
Joined: Nov 19 2005
Gold: 49,898.00
Aug 12 2012 08:29am
Hey guys !!
Well, I already had tried this one but it didn't work.
This or I'm too stupid.
Is there anyone who know how to make this lib work ?

Thanks.
Member
Posts: 32,925
Joined: Jul 23 2006
Gold: 3,804.50
Aug 12 2012 10:22am
Quote (Pegase @ Aug 12 2012 10:29am)
Hey guys !!
Well, I already had tried this one but it didn't work.
This or I'm too stupid.
Is there anyone who know how to make this lib work ?

Thanks.


show us your code and explain what didn't work. exception? lack of permissions? runs but doesn't do anything?
Member
Posts: 2,650
Joined: Nov 19 2005
Gold: 49,898.00
Aug 13 2012 01:12am
Quote (carteblanche @ 12 Aug 2012 17:22)
show us your code and explain what didn't work. exception? lack of permissions? runs but doesn't do anything?


The thing is I don't even know how to install it.
I think I have to put in as external jar on eclipse, and then what ? :x
Member
Posts: 32,925
Joined: Jul 23 2006
Gold: 3,804.50
Member
Posts: 2,650
Joined: Nov 19 2005
Gold: 49,898.00
Aug 13 2012 07:16am
It doesn't really help :(
Member
Posts: 32,925
Joined: Jul 23 2006
Gold: 3,804.50
Aug 13 2012 11:07am
I'm not going to spoon feed you. I clicked the link that said "How to import the library to the project" and came across the install page. Then i noticed it had page_id=8 at the end of the url, so i changed the numbers and saw a few more useful looking pages. try putting in some other numbers and see what you get if you don't see what you want. I see examples here and also javadoc api. Now read.

install:
http://libusbjava.sourceforge.net/wp/?pageid=8

examples:
http://libusbjava.sourceforge.net/wp/?pageid=6

api:
http://libusbjava.sourceforge.net/wp/res/doc/index.html

This post was edited by carteblanche on Aug 13 2012 11:09am
Go Back To Programming & Development Topic List
Add Reply New Topic New Poll