Problem while using reading USB Port : using JSR80

i want to read the data comming from a usb keyboard.
So i looked for the api's in java and could find jUSB and JSR80.
when i tried using jUSB, i could detect the device connected to the usb port
but for that i had to do many things, whih included editing the registry to make a generic JSUB driver. so this implementation is not acceptable to my current requirement which is a web application..and the java program to detect the usb device come in an applet. so we cannot go to each client machines accessing the page and configure the driver and make regisrty edits.
So i moved to JSR80..which was telling abt a complete implementation in Linux.
but what i want is for windows. JSR80 also have an uncertified windows support. so i tried usig it.
i downloaded the following files
http://javax-usb.cvs.sourceforge.net/javax-usb/javax-usb-libusb/lib/jsr80_windows.jar?view=log
javax.usb.properties
jsr80.jar
jsr80_ri.jar
jsr80_windows.jar
downloaded libusb-win32-filter-bin-0.1.10.1.exe from
http://libusb-win32.sourceforge.net/
and created an eclipse project added the jars using the javabuildpath menu.
copied the location of javax.usb.properties in classpath system variable.
insatlled the exe for libusb.
now i wrote the following code.
it didn't show any compile error so i assumed what i did with the jars are correct.
import java.util.Properties;
import javax.usb.UsbException;
import javax.usb.UsbHostManager;
import javax.usb.UsbHub;
import javax.usb.UsbServices;
public class SampleUSBTest {
      * @param args
     public static void main(String[] args) {
          // TODO Auto-generated method stub
          SampleUSBTest obj=new SampleUSBTest();
     public SampleUSBTest()
          UsbServices services;
          try {
               services = UsbHostManager.getUsbServices();
               UsbHub vroothub = services.getRootUsbHub();
               String s=vroothub.toString();
               System.out.println(s);
          } catch (SecurityException e) {
               e.printStackTrace();
          } catch (UsbException e) {
               e.printStackTrace();
}But when i ran the code it showed the following runtime error.
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory
     at com.mcreations.usb.windows.JavaxUsb.<clinit>(JavaxUsb.java:65)
     at com.mcreations.usb.windows.WindowsUsbServices.<init>(WindowsUsbServices.java:46)
     at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
     at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
     at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
     at java.lang.reflect.Constructor.newInstance(Unknown Source)
     at java.lang.Class.newInstance0(Unknown Source)
     at java.lang.Class.newInstance(Unknown Source)
     at javax.usb.UsbHostManager.createUsbServices(Unknown Source)
     at javax.usb.UsbHostManager.getUsbServices(Unknown Source)
     at SampleUSBTest.<init>(SampleUSBTest.java:23)
     at SampleUSBTest.main(SampleUSBTest.java:16)can anyone please give suggestions on this.
sample code with steps to configure and the links for reference will be really appreciated.
thank u

I am also facing the same problem with the code and getting errors while running my application in Eclipse is this some version problem or any other isues are afftecting my application to run successfully.
I get following errors while running my application inspite of having all the jars and libusb for windows:
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory
     at com.mcreations.usb.windows.JavaxUsb.<clinit>(JavaxUsb.java:65)
     at com.mcreations.usb.windows.WindowsUsbServices.<init>(WindowsUsbServices.java:46)
     at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
     at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
     at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
     at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
     at java.lang.Class.newInstance0(Class.java:350)
     at java.lang.Class.newInstance(Class.java:303)
     at javax.usb.UsbHostManager.createUsbServices(Unknown Source)
     at javax.usb.UsbHostManager.getUsbServices(Unknown Source)
     at org.symphony.embedded.ShowTopology.getVirtualRootUsbHub(ShowTopology.java:56)
     at org.symphony.embedded.FindUsbDevice.main(FindUsbDevice.java:29)

Similar Messages

  • Error while reading USB Port : using JSR80

    Hi Everybody
    Iam trying to read the data from a usb device [a fingerprint scanner] by using jsr80 with the help of following files which are in my classpath
    1) jsr80-1.0.1.jar
    2) jsr80_ri-1.0.1.jar
    3) jsr80_windows.jar
    4) commons-logging-api-1.1.1.jar
    5) javax.usb.properties
    6) LibusbJNI.dll
    7) LibusbJava.dll
    8) libusb0.dll
    I was trying the follwoing program
    import javax.usb.*;
    import java.util.List;
    public class TraverseUSB
            public static void main(String argv[])
              try
                  // Access the system USB services, and access to the root
                  // hub. Then traverse through the root hub.
                  UsbServices services = UsbHostManager.getUsbServices();
    System.out.println("Getting Available USB Services ");
                  UsbHub rootHub = services.getRootUsbHub();
    System.out.println(" Access to the USBrootHub ");
                  traverse(rootHub);
              } catch (Exception e) {
              System.out.println(e);
            public static void traverse(UsbDevice device)
              if (device.isUsbHub())
                 // This is a USB Hub, traverse through the hub.
                 List attachedDevices = ((UsbHub) device).getAttachedUsbDevices();
                 for (int i=0; i<attachedDevices.size(); i++)
                   traverse((UsbDevice) attachedDevices.get(i));
              else
         System.out.println("USB Device");
                 // This is a USB function, not a hub.
                 // Do something.
    }but when iam executing the program iam getting the exception
    The Ordinal 44 could not be located in the dynamic link library "libusb0.dll" , it is coming in a message box
    javax.usb.UsbException: Error while loading shared library LibusbJNI.dll : C:\WINDOWS\LibusbJNI.dll:
    The operating system cannot run %1
    Please help in this regards
    Thanks in adv
    Sulfikkar

    I am also facing the same problem with the code and getting errors while running my application in Eclipse is this some version problem or any other isues are afftecting my application to run successfully.
    I get following errors while running my application inspite of having all the jars and libusb for windows:
    Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory
         at com.mcreations.usb.windows.JavaxUsb.<clinit>(JavaxUsb.java:65)
         at com.mcreations.usb.windows.WindowsUsbServices.<init>(WindowsUsbServices.java:46)
         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
         at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
         at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
         at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
         at java.lang.Class.newInstance0(Class.java:350)
         at java.lang.Class.newInstance(Class.java:303)
         at javax.usb.UsbHostManager.createUsbServices(Unknown Source)
         at javax.usb.UsbHostManager.getUsbServices(Unknown Source)
         at org.symphony.embedded.ShowTopology.getVirtualRootUsbHub(ShowTopology.java:56)
         at org.symphony.embedded.FindUsbDevice.main(FindUsbDevice.java:29)

  • How to read a data from USB port using JAVA

    hi all,
    i need to know how to read a data from USB port using java. any API are available for java ?.........please give your valuable ideas !!!!!!!!!
    Advance Thanks!!

    You can do this. Please use this link
    [http://www.google.co.in/search?hl=en&client=firefox-a&rls=org.mozilla%3Aen-US%3Aofficial&hs=uHu&q=java+read+data+from+usb+port&btnG=Search&meta=&aq=f&oq=]
    What research did you do of your own? Have you done some testing application and tried yourself??

  • I am currently using the firewire port on my macbook pro to record dv from my camera. Can I capture video/audio using my USB port as well?ra

    I've been connecting a sony PD170 via firewire to my Macbook pro to record directly using Quicktime pro. Can I use the usb port (and mini audio in) to accomplish this with a camcorder that doesn't have a fire wire port but does have USB out?

    It could just be a bad disc - I use Verbatim and have only had one fail in a ten-year time period. Try getting a batch of Verbatims and see if you have any problems. I didn't even know that there were Kodak branded discs...
    Clinton

  • HT2188 i just upgraded my iphone 3gs to ios 6 not sure if it updated but now when i turn on my phone it says automatically that i need to connect it to itunes using the USB port but when i connect it it comes up as new hardware and cannot find a program/s

    i just upgraded my iphone 3gs to ios 6 not sure if it updated but now when i turn on my phone it says automatically that i need to connect it to itunes using the USB port but when i connect it it comes up as new hardware and cannot find a program/software for my device even though i have the latest itunes on my computer. i have tried reinstalling itunes but it still cannot find my phone and now i cannot use my phone as it is stuck on the sync to itunes screen

    Have you downloaded and installed the latest version of iTunes from here:
    http://www.apple.com/itunes/download/

  • MacBook Pro 13" 2011 - Won't let me use 2 USB ports at the same **** time.

    I'm trying to use 2 usb driven hardware devices at the same time and it won't let me - one of them always disconnects (usually the 2nd port) ...even though both devices work on other macbooks ive used lately..
    Is it possible one of them isnt properly powered? Is there any way of "turning" them both on?
    Sorry I sound so novice, i've had macs for 10+ years but i've never had this problem before...

    USB ports on a computer have always had a limited amount of power. The least expensive solution is to get a powered USB hub, meaning it has a separate power supply. The hub will provide enough power to keep things running.
    It will also make your extenal hard drives behave better it they are USB-powered.
    Here's an example:
    Newer Technology 7 Port Hi-Speed USB 2.0 Hub with Power Adapter for Mac & PC

  • I am unable to download pictures from my Sony Cybershot to my iMac, I have tried using the USB port as well as simply inserting the memory stick into the slot.  I have been able to do this in the past as recently as a few weeks ago.... Help please..

    I am unable to download pictures from my Sony Cybershot to my iMac, I have tried using the USB port as well as simply inserting the memory stick into the slot.  I have been able to do this in the past as recently as a few weeks ago.... Help please..

    Thanks Eric for responding.
    I checked and it does not appear in the Applications folder.
    I tried yesterday on an ethernet connection with a download speed of 2 Mbps but, unfortunately the connection died(It happened from the ISP end, which is out of my control) in between after which there was no trace of the download that happened for so long(till the internet connection death). 
    One more serious query which I am unable to understand. If the internet connection, dies in the midst of the download is in progress why is it so that the state does not persist and one has to restart the entire process again. Is there no solution for this?
    I tried so many times and its the same case after some amount of download it vanishes. So many unsuccessful attempts. I am ****** off now. Is it not possible to see Mavericks? Why does different machines of Apple behave differently? Somewhere it goes smoothly and somewhere like my mine. Why did not Apple release a non apple store version? Is this not a bad sign of letting the users struggle when something is being offered for free?
    The reason I asked as whether we can download the .app of Mavericks is that, there are so many applications that I have downloaded web and have installed. All that works fine. Can't we do the same here? You download a copy of Mavericks installer application and upload it for me in Google drive or like online storage places which can be downloaded and used by me? Help me understand.
    Thanks again.

  • After ejecting a disk plugged into the USB port using Finder, I am now getting "The disk was not properly ejected" message.  This didn't used to happen.  How can this be corrected?

    After ejecting a disk plugged into the USB port using Finder, I am now getting "The disk was not properly ejected" message.  This didn't used to happen.  How can this be corrected?

    When you right (control) click on the disk and click eject "disk name", do you pull it immeadiatly or wait a few seconds for it to unmount? Try waiting and see if you get the same message. If you do, when the disk is connected go to applications/utilities/disk utility, after opening DU, select the volume in question from the left side bar and try a permissions repair, you may also run verify disk and see if it comes up with any errors (they will be in red)

  • Is it possible to charge a Canon camera battery pack using a USB port?

    Is it possible to charge a Canon camera battery pack using a USB port?

    bkroczak wrote:
    Either is fine. I looked on ebay and battery pack chargers seem to be available to plug into USB ports. Until now my cameras only took regular batteries. I'm not sure if it will take an awful lot longer than charging at 110V but at least it's possible.
    I'd be surprised if this effort pans out. The only Canon camera I've ever owned that could charge its own battery was a G-5. And I'm pretty sure it didn't do it through a USB port. It had, IIRC, a special charging port. and the charger itself ran on 110VAC.

  • Acquiring Images using the USB port

    I want to acquire Images using the USB port of the PC. Is it possible to acquire images using the USB port and analyze the image using IMAQ library. If we use the USB port direct then we may not need the IMAQ vision acquisition card.

    Try Irene's drivers (see previous answer above), or Peter Parente's webcam drivers (www.mindofpete.org).
    cheers,
    Christopher
    Christopher G. Relf
    Certified LabVIEW Developer
    [email protected]
    International Voicemail & Fax: +61 2 8080 8132
    Australian Voicemail & Fax: (02) 8080 8132
    EULA
    1) This is a private email, and although the views expressed within it may not be purely my own, unless specifically referenced I do not suggest they are necessarily associated with anyone else including, but not limited to, my employer(s).
    2) This email has NOT been scanned for virii - attached file(s), if any, are provided as is. By copying, detaching and/or opening attached files, you agree to indemnify the sender of such responsib
    ility.
    3) Because e-mail can be altered electronically, the integrity of this communication cannot be guaranteed.
    Copyright © 2004-2015 Christopher G. Relf. Some Rights Reserved. This posting is licensed under a Creative Commons Attribution 2.5 License.

  • Does anyone know how to comunicate with a USB port using labview 6?

    Does anyone know how to comunicate with a USB port using labview 6?

    Unfortunately, there is no way to communicate directly with a USB port before LabVIEW 7.0 and VISA 3.0. With the new releases, there are functions called "VISA USB Control In" and "VISA USB Control Out" that give you direct access to a USB port.
    You can definitely communicate with DAQ, Serial, or GPIB devices that are connected through a USB port, though. This is done seamlessly through the NI-DAQ, NI-Serial, and NI-488.2 drivers.
    Luke S.

  • Connecting wirelessly using the USB Port

    I recently saw a small device at Best Buy that allows my computer to connect remotely to the internet (via cable modem) using the USB port that costs only $60. Do you know of this and can you comment?

    Are you trying to do this because your Ethernet port is broken? Is it a wireless device? Can you link to a product description?

  • MBA will not allow me to use both usb ports at the same time.

    My MBA will not allow me to use both usb ports at the same time. as soon as i plug the second in the first is disabled. trying to use a modem and printer.

    What kind of peripherals are you connecting? Sometimes if an external device is drawing too much power, then it will shut down one of the USB ports. Make a test connecting two usb flash drives, it should work ok.

  • Is it safe to charge an iPhone overnight using a USB port on a surge protector?

    I just bought a new surge protector that has two USB ports built in. I know it is safe to charge an iPhone using the USB ports on a computer, and it is safe to charge an iPhone using the supplied power adapter. However, I have heard that the supplied power adapter (the brick) that comes with the phone automatically stops charging the iPhone when it reaches 100%. I normally leave my iPhone charging overnight. So my question is, would it be safe to charge my iPhone overnight via the built in USB port on my new surge protector? Or should i continue using the power adapter that it came with?
    This is the surge protector i purchased.
    http://www.bestbuy.com/site/8-outlet-2-usb-port-surge-protector/8968315.p?id=121 8960133790&skuId=8968315&st=usb%20outlet&cp=1&lp=2

    Yes, it's safe. The phone is actually what stops the charging.

  • Using the USB port for an external HD dumb question

    OK. Forgive a possibly really dumb question here...
    My external HD has a USB 2.0 interface and I hooked it up to the USB port using a cable that came with an old USB 1 hub I'm not using right now.
    My dumb question is this: is there such a thing as a USB 2.0 cable? Or are the USB cables all the same?
    Also, how long should it be taking to transfer 12.1 GB of data (about 9,000 photos) from my external HD mounted on the AirMac base station to my MBP? There are still 48 minutes left and it seems an awfully long time for 12.1 GB of data. That's why I was wondering if the cable could be an issue...
    Thanks,
    doug

    I am suspecting now that my HD might really have been a USB 1.0 drive...
    doug

Maybe you are looking for

  • Not able to create a link

    Hi, this is my scenario. i have this one report page with 3 report regions. i have a hidden item called "item1" in region1, i display my 1 record match. and the first column called "collection" of the record i want to trap it into the hidden value. a

  • TS4445: iCloud: iCloud Control Panel 2.0 for Windows requires repair after installation on Windows Vista 64-bit

    I have just installed iCloud control panel 2.1, but this has not resolved the Outlook issue. HP Win7 Outlook 2010. Does Apple or any user have a suggestion?

  • No thumbnails in Bridge 2.1.1.9

    Latest fun with Bridge......... Yesterday afternoon, while examining thumbnails for a directory (it worked FINE BEFORE THIS), I suddenly got no thumbnails. Put the folder on a directory with images - content panel is EMPTY. Bridge appears to be hung

  • Games not showing up in Game Center.

    When I look at 'Games' under Game Center, it shows 0 games. When you click on the 'Find Game Center Games' button it takes you to the 'Game Center' section of the App Store, where surprisingly enough there is a game in the Game Center' section of the

  • Burn DVD off digital cable box?

    I tried searching this topic a number of ways so I apologize if this is repetitious, the ones I found just didn't seem to be relevant. I was just wondering if I could burn a dvd on my mac from a digital cable box? The box is a Scientific Atlanta Expl