Javax.usb problem

i would like to use window xp to test this 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();
UsbHub rootHub = services.getRootUsbHub();
traverse(rootHub);
} catch (Exception 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
// This is a USB function, not a hub.
// Do something.
error message
C:\TraverseUSB.java:1: package javax.usb does not exist
import javax.usb.*;
^
C:\TraverseUSB.java:18: cannot resolve symbol
symbol : class UsbDevice
location: class TraverseUSB
public static void traverse(UsbDevice device)
^
C:\TraverseUSB.java:12: cannot resolve symbol
symbol : class UsbServices
location: class TraverseUSB
UsbServices services = UsbHostManager.getUsbServices();
^
C:\TraverseUSB.java:12: cannot resolve symbol
symbol : variable UsbHostManager
location: class TraverseUSB
UsbServices services = UsbHostManager.getUsbServices();
^
C:\TraverseUSB.java:13: cannot resolve symbol
symbol : class UsbHub
location: class TraverseUSB
UsbHub rootHub = services.getRootUsbHub();
^
C:\TraverseUSB.java:23: cannot resolve symbol
symbol : class UsbHub
location: class TraverseUSB
List attachedDevices = ((UsbHub) device).getAttachedUsbDevices();
^
C:\TraverseUSB.java:26: cannot resolve symbol
symbol : class UsbDevice
location: class TraverseUSB
traverse((UsbDevice) attachedDevices.get(i));
^
7 errors
Tool completed with exit code 1
also i would like to ask when i run this program, what package do it use. and how can i run this program.

Hi, i've tried this code as well.. i manage to solve your error, but i cant get it to run properly.
meaning, the program cant read the device at all. i also had teh same code as you, i got it from somewhere, but it don't seem to work.. can anyone help me?
System.out.println("hello");
UsbServices services = UsbHostManager.getUsbServices();
System.out.println("hello1");
UsbHub rootHub = services.getRootUsbHub();
System.out.println("hello2");
traverse(rootHub);
System.out.println("hello3");
the output is only hello.
so i don't know what is wrong.. anyone any idea?
download link: [http://sourceforge.net/project/showfiles.php?group_id=21114]

Similar Messages

  • Error Installing javax.usb

    Hello
    I know that Javax.usb was not created by sun but I'm looking for a solution and it's my last chance.
    I'm trying to install Javax.usb, the installation goes well for the API and the Common RI. Things are going wrong with the Linux RI.
    I Have this message at compilation :
    [moi@eeePC javax-usb-ri-linux]$ ant compile
    Buildfile: build.xml
    compile:
         [echo] Compiling class files.
         [echo] Compiling JNI library.
    BUILD FAILED
    /home/moi/Bureau/javax-usb/javax-usb-ri-linux/build.xml:114: Problem: failed to create taskor type javah
    Cause: the class org.apache.tools.ant.taskdefs.optional.Javah was not found.
            This looks like one of Ant's optional components.
    Action: Check that the appropriate optional JAR exists in
            -/usr/share/ant/lib
            -/home/moi/.ant/lib
            -a directory added on the command line with the -lib argument
    Do not panic, this is a common problem.
    The commonest cause is a missing JAR.
    This is not a bug; it is a configuration problem
    Total time: 1 secondI understand That this is an ANT configuration problem but after much googling I found the class that lacks with a complete Jar file.
    I copied the Jar File and its uncompressed version every on the system
    in /usr/share/ant/lib,/home/moi/.ant/lib and also in many directories. According to the error, it should have been enough but it is not.
    Can someone help me please ?
    System Information :
    ANT : Apache Ant version 1.7.1 compiled on August 2 2008
    Linux : Linux eeePC 2.6.27-desktop-0.rc8.2mnb #1 SMP Thu Oct 2 06:11:56 EDT 2008 i686 Intel(R) Atom(TM) CPU N270 @ 1.60GHz GNU/Linux

    Does anyone have an Idea ?

  • Linux, Java and Javax.usb

    Hello,
    I've spent 3 days trying to install the javax.usb package on my linux with the classical package and I finally found the javax.usb RPMs. I installed them and every thing seemed fine until I tried to run a java program.
    Now I'm unable to run any program.
    Completion does not work anymore e.g. when I'm in a directory with a .class file, the completion is unable to find it.
    That would not be a real problem but when I try to run a java program, I always end up with a ClassNotFoundException. Does anyone have a clue about what is happening to me.
    System : Mandriva 2009.0
    Linux Kernel 2.6

    Packages that begin with "java" are base packages.
    Packages that begin with "javax" are extensions to
    Java (hence the "x").
    AWT was the first UI package in Java. Swing came
    later and was added as an extension.
    %aha, right. cheers

  • USB problems since EFI firmware update 2.6

    My MBA has been suffering USB problems since this update.
    I have an IOGear USB 3 GUH374 hub.  I connect my iPad mini and USB 3 disk to it.
    Since the update, the iPad has stopped charging through the hub.  Now, I can't find the power specs of the hub, so I don't know that it should work, but it was working fine.  Now, the iPad says "not charging".
    The USB disk has spontaneously disconnected a few times, with the system reporting that it was improperly disconnected.  One time, the disk was corrupted.
    This could be a coincidence, so I've contacted IOGear.  But, I'm also having new, different, sleep problems with the MBA and Mountain Lion.
    ==Leonard

    Sitongia
    This is a user community, it is not Apple.
    If you wish to thank Apple, here is the feedback link for iPad.
    http://www.apple.com/feedback/ipad.html

  • MAC PRO USB Problem - Traced to bad Apple Keyboard Extension Cable

    I found a fix to a problem synching to my itunes Library on my early 2008 MAC PRO.   The Apple supplied USB extension cable for the keyboard was defective.
    The symptoms were hangs in itunes and finder synching to iPods and transferring data to USB hard drives. The iPods and hard drives never lost power and no errors/log entries were made. The transfers simply stalled and would not continue. itunes and finder would hang until the drive or ipod was removed. These devices were installed directly to USB ports on the MAC PRO. No other USB devices were connected except for the aluminum keyboard and mighty mouse; the mouse was connected to the keyboard. The keyboard was connected using the USB extension cable that shipped with the MAC PRO.
    Hardware diagnostics were all clear. The keyboard and mouse never had any connection problems. Only itunes syncs and hard drive copies would fail; these would occur at random times. I had an open ticket with Apple to have the logic board replaced as it was diagnosed to be a hardware/USB problem.
    Removal or replacement of the extension cable on the keyboard (which was connected to a different USB port and NOT in the USB chain with the ipod and hard drives) permanently fixed the problem. I cancelled the Apple HW replacement.
    I have noted several posts with others having problems with USB ports and devices. I wonder if Apple has an unknown problem with bad keyboard extension cables.

    I think you may be onto something there. I'm just a few weeks into my second Mac Pro and again it's having the same USB problems which led Apple to give me a replacement machine previously. I went through several weeks of considerable testing with Apple Engineers prior to that - an Apple Care application to collect data from my machine, Apple Developer USB prober and two clean installs. The latest machine initially showed no sign of the problem then it started again - 2 iPods "can not be read or written to" part way through sync, Aperture quitting importing from USB SD card reader, USB drives dismounting etc. So I pulled out the Aluminium keyboard and, lo and behold, the iPods managed to get all the way through synching without errors. I really like the alu keyboard so it's a huge shame that it might be the cause of all my problems so far - and the Mac Pro is otherwise a beautiful computer.
    But is this really a hardware problem of the internal USB cards and power management or supply?

  • My iPad2 went blank. Troubleshooter says driver software MTP USB problem, what do I need to do?

    My iPad2 went blank. Troubleshooter says driver software MTP USB problem, what do I need to do?

    iOS: Resolving update and restore alert messages
    For error -50: See error 13 and 14: 
    Error 13 and 14: These errors are typically resolved by performing one or more of the steps listed below:
    Perform USB isolation troubleshooting, including trying a different USB port directly on the computer. See the advanced steps below for USB troubleshooting.
    Put a USB 2.0 hub between the device and the computer.
    Try a different USB 30-pin dock-connector cable.
    Eliminate third-party security software conflicts.
    There may be third-party software installed that modifies your default packet size in Windows by inserting one or more TcpWindowSize entries into your registry. Your default packet size being set incorrectly can cause this error. Contact the manufacturer of the software that installed the packet-size modification for assistance. Or, follow this article by Microsoft: How to reset Internet Protocol (TCP/IP) to reset the packet size back to the default for Windows.
    Connect your computer directly to your Internet source, bypassing any routers, hubs, or switches. You may need to restart your computer and modem to get online.
    Try to restore from another known-good computer and network.

  • Properties File: javax.usb ?

    Hi Guys,
    I'm sure you've all heard this a million times, but I'm hung up on it. I'm trying to learn about javax.usb, and keep getting this exception:javax.usb.UsbException: Properties file javax.usb.properties not found.And I swear to God guys, it's there (i know i'm wrong though).
    This is what I've added to my buildpath:
    -javax-usb_1.0.1.zip
    -javax-usb-ri_1.0.1.zip
    -jsr80-1.0.1.jar
    -jsr80_ri-1.0.1.jar
    -javax-usb-tck_1.0.1.zip
    Take a look for yourself: http://img.photobucket.com/albums/v335/shlumph/referencedLibraries.jpg
    How come the compiler can't see that the javax.usb.properties file is there? What is the best way to fix this?
    If it helps, here is my source code:
    import java.io.UnsupportedEncodingException;
    import java.util.*;
    import javax.usb.*;
    public class USBListener {
         public static void main(String[] args) {
              try{
                   UsbServices services = UsbHostManager.getUsbServices();
                   UsbHub root = services.getRootUsbHub();
                   listDevices(root);
              } catch (Exception e) {
                   System.out.println(e);
         public static void listDevices(UsbHub hub) throws UnsupportedEncodingException, UsbException {
              List devices = hub.getAttachedUsbDevices();
              Iterator iterator = devices.iterator();
              while(iterator.hasNext()) {
                   UsbDevice device = (UsbDevice)iterator.next();
                   describe(device);
                   if(device.isUsbHub()) {
                        System.out.println("is hub");
         public static void describe(UsbDevice device)
              throws UnsupportedEncodingException, UsbException {
              UsbDeviceDescriptor descriptor = device.getUsbDeviceDescriptor();
              byte manufacturerCode = descriptor.iManufacturer();
              System.out.println("Manufacturer index: " + manufacturerCode);
              System.out.println("Manufacturer String: " + device.getString(manufacturerCode));
              System.out.println("USB version: " + decodeBCD(descriptor.bcdUSB()));
              System.out.println("Maximum control packet size: " + descriptor.bMaxPacketSize0());
         public static String decodeBCD(short bcd) {
              int upper = (0xFF00 & bcd) >> 8;
              int middle = (0xF0 & bcd) >> 4;
              int lower = 0x0F & bcd;
              return upper + "." + middle + "." + lower;
    }

    Hi,
    Probably you did not set properly your classpath. Read the following FAQ:
    http://javax-usb.org/faq.html#get_properties_file
    http://javax-usb.org/faq.html#what_is_properties_file
    http://javax-usb.org/faq.html#linux_imp_jar_file
    http://javax-usb.org/faq.html#still_doesnt_work
    Note that for Windows: "This is a pre-alpha Windows implementation (it does not work, it needs a kernel driver)."
    http://javax-usb.cvs.sourceforge.net/javax-usb/javax-usb-ri-windows/README?view=markup
    Mimo

  • Javax.usb

    Hello
    I'm planning to write an application to connect to a development board via USB connection.
    After google-ing i ended up trying to install javax-usb.
    Downloaded the 3 packages:
         javax-usb_1.0.2
    javax-usb-ri_1.0.2
         javax-usb-ri-linux_1.0.2
    javax-usb builds ok. I add the path to "/lib/jsr80.jar" to my CLASSPATH.
    when I try to build the second one, javax-usb-ri_1.0.2, I get lots of errors:
    clean:
    [echo] Cleaning everything.
    compile:
    [echo] Compiling class files.
    [javac] Compiling 50 source files to /home/iggy/Documents/javax-usb-ri/src
    [javac] /home/iggy/Documents/javax-usb-ri/src/com/ibm/jusb/DefaultUsbInterfacePolicy.java:12: package javax.usb does not exist
    [javac] import javax.usb.*;
    [javac] ^
    [javac] /home/iggy/Documents/javax-usb-ri/src/com/ibm/jusb/DefaultUsbInterfacePolicy.java:18: cannot find symbol
    [javac] symbol: class UsbInterfacePolicy
    [javac] public class DefaultUsbInterfacePolicy implements UsbInterfacePolicy
    [javac] ^
    [javac] /home/iggy/Documents/javax-usb-ri/src/com/ibm/jusb/DefaultUsbInterfacePolicy.java:37: cannot find symbol
    [javac] symbol : class UsbInterface
    [javac] location: class com.ibm.jusb.DefaultUsbInterfacePolicy
    [javac]      public boolean forceClaim(UsbInterface usbInterface) { return false; }
    [javac]      ^
    [javac] /home/iggy/Documents/javax-usb-ri/src/com/ibm/jusb/UsbConfigurationDescriptorImp.java:12: package javax.usb does not exist
    [javac] import javax.usb.UsbConfigurationDescriptor;
    [javac] ^
    [javac] /home/iggy/Documents/javax-usb-ri/src/com/ibm/jusb/UsbConfigurationDescriptorImp.java:13: package javax.usb.util does not exist
    [javac] import javax.usb.util.UsbUtil;
    [javac] ^
    etc..
    I guess it doesn't seem to find the javax.usb library.Or...???
    the third does't build either...naturally.
    So what am I doing wrong?I'm using Ubuntu 8.10.
    Is there any other way to make buld I/O over USB (besides using JNI)?

    for jUSB on windows you should read the manual that came with it to enable the specific device as a JUSB device ( the appendixes i think ), it involves going into your device manager i think ( the instructions should say and be simple enough ), i don't like it because it defeats the purpose of being able to plug the device into any usb port and doing a search for it from there and then being able to communicate with it, it also prevents the original app. from communicating with it successfully through the port you configured the device for
    by the way the device i used the java usb packages for is the vernier go temp. sensor =) (developing a program to display and record data from it while using it in my chemistry labs which would beat the hell out of standing, stirring, and measuring temp. with an alcohol thermometer to the second decimal place every 15 seconds for about 30 minutes for about 6 rounds with an avg. temp. rate change of about 1 deg. per 80 secs. =( )
    Edited by: scphan on Mar 19, 2009 3:40 PM

  • MS-6390: Return Of The USB Problem!

    Almost a year ago I posted a thread regarding a USB problem  in which after a few hours runtime, the USB ports stop  working. Having reinstalled Windows, I followed the  original thread to fix the problem again but this time, it  hasn't work. The old thread for reference is; https://forum-en.msi.com/index.php?topic=49727.0
    but I shall try and include everything important here so it  shouldn't be needed.
    Firstly the nature of the problem;
    Any new device plugged into them is not recognisied and  Windows advises that it is the device that is  malfunctioning.
    Restarting the computer will eliminate the problem, however  upon rebooting, the computer tends to get stuck at what may  be the memory count. If left for 10 minutes, the memory  amount comes up and the computer boots normally. This is  circumvented by temporarily (one second) removing power to  the power supply by pulling the plug or flicking the switch  at the back.
    [It may or may not be relevant that the HDD activity  indicator is lit for approximately 30 seconds of this 10  minute period]
    Upon switching the computer on again, the computer boots up  normally and the USB ports continue to function for another  variable period of time.
    This problem occurs if there are no devices plugged into  the USB, any single device (printer, gamepad, mobile phone)  or any combination.
    It should also be noted that if the computer crashes due to  any of many unrelated reasons after this problem has  arisen, and I use the reset button to make it reboot, the  10 minute reboot problem occurs again but appears  differently on screen in that it actually says 'memory  check' or words to that effect with a space where the  normally RAM amount goes, a  '+'  and another empty space  where the memory reserved for onboard graphics normally  goes (i.e. memory check:       +     )
    I've tried uninstalling the drivers and reinstalling those  downloaded from VIAs website for my chipset.
    My USB ports are set not to power down to save power in  device manager.
    The multi-card reader (plugged directly into the  motherboard) also stops functioning when the USB ports go  down - power light stays on, activity light stops flashing  (occasionally power light turns off). Unplugging it from  the motherboard does not resolve the issue.
    I want to resolve this issue so the computer is trouble-free when I give it my mum to learn from.
    Comp. specs in signature. Thanks in advance.

    I don't know how to dig deeper...  Soon this computer will only be using a single 80 gig HD, and I'll remove the fan controller (it'll be mums computer). I'll then be able to try just using sp1a.
    This PSU I'm using is reviewed here with a several others. (the model number is the same, but the one tested doesn't appear to be dual rail - they actually state the number slightly incorrectly, but it's correct in the picture of the label they show.
    I think it performed quite well, being one of only two that were able to keep producing (just) over 1 v at 100% load, whilst most others just plumetted. A significant but probably not damaging drop to 4.87v on the 5v rail and again 3.26 on the 3.3v rail all at 100% load (which you're never supposed to due to the PSU anyway). It got a recommended award since apparently it doesn't have many features but I don't think I'm in need of any features it lacks.
    Furthermore - at the back it has a control for fan speed. Currently set on Auto, it maintains the same fan speeds (audiability) as on Low - thus I conclude it has headroom to push itself if necessary (in which case the fans would spin faster).
    Apart from someone who said they're "cheapo", I havn't yet found any negative comments regarding Jeantech PSUs.

  • Shuffle USB Problem - Some Observations

    I decided to start a new thread with some additional observations I have made regarding the Shuffle and USB problems. Some of this already appeared as a reply to the "ipod usb" thread. Anyway recapping from my previous post:
    When plugged into the USB port of my machine, the front LEDs (above the control area) flash the following:
    GREEN and ORANGE (YELLOW?) flash together for between 1/4 and 1/2 second. This is followed by the GREEN LED alone for about 1.5 seconds. 3 seconds of nothing, then it repeats. The battery condition LED on the back (below the ON/OFF switch blinks ORANGE for about 1/4 second every 4 seconds.
    Plugging the Shuffle into another computer (a laptop), the Shuffle is recognized and the LEDs behave normally.
    Now the weird thing is that the Shuffle had worked on the machine where it is now not recognized. In fact the iTunes 7.0.1 diagnostics show the serial number of the Shuffle as the last iPod connected. Also, the USB on the iTunes machine is a USB 1.0 and on the laptop is USB 2.0.
    NEW OBSERVATIONS:
    My 20GB Click Wheel iPod works fine under 7.0.1. The fact that it works leads me to believe the USB port and power are fine. If it the USB port can drive a hard disk iPod, it better be able to drive a Shuffle!
    I loaded up the version of iTunes that came with the Shuffle on another Windows 2000 box I have. The Shuffle was recognized and did a RESTORE on it. Windows even recognized it. The version of Windows IS NOT as currently patched as the computer on which I have iTunes 7.0.1 installed.
    I uninstalled iTunes 7.0.1 and installed version 6.0. Aside from 6.o not starting because some file got converted, Win2000 still did not recognize the Shuffle.
    So here are my thoughts:
    1) A recent Windows 2000 patch causes Shuffles to be ignored by the OS. There is a comment about a problem like this with XP, but I was not able to find anything Win2000 related. The machine I am having problems with is up to dat with regard to patches.
    2) If V7.0.01 is the problem, even uninstalling it and reinstalling an old version of iTunes leaves some part of the driver or something that still causes problems.
    3) The Phillips Pronto remote software I installed somehow causes a bad interaction with only the Shuffle. Remember, my click wheel iPod still works!
    Right now I am leaning towards an issue specific to Windows2000 and the Shuffle. Maybe a conspiracy to get us all to buy Zunes?
    If anyone has additional observations or suggestions on how to fix the problem, I (and a bunch of other people) would really like to hear from you.
    Thanks!
    Don

    Okay, I got focused on the fact that other machines
    would recognize my Shuffle, but not my main machine.
    It dawned on me that the Windows Registry stores
    information about USB devices whether or not they
    are plugged in, so I snooped around and found the
    entries for the iPod.
    I did some searches and found a reference to this MS
    KB article:
    http://support.microsoft.com/kb/315539/en-us
    Basically describes how to show the "hidden" (i.e.
    removed USB) devices. Went into the USB section and
    deleted the 2 entries I had for iPods (my Shuffle and
    20GB click wheel).
    Plugged my Shuffle in and BINGO! Windows recognized
    the Shuffle and iTunes 7.0.1 recognized the Shuffle!
    In fact, as I write this post, my poor little
    Shuffle is having my jogging play list reinstalled
    since it got wacked by the 'restore' on the other
    machine.
    Bottom line, it looks like I managed to solve my
    green and orange LEDs of death problem!
    Your mileage may vary!
    Good luck!
    Don
    Yes, great, this is a fix for this problem. Thank you very much.
    Athlon   Windows XP  

  • Macbook Air 2011 USB Problem

    Hi, I recently bought a Toshiba portable hard drive that uses usb 3.0. For some reason, my mid-2011 macbook air 13" is unable to connect to the drive with the USB3 to microUSB3 cable. However, the hard drive worked on a late 2010 macbook air 11", other macbooks and pcs using the usb3 cable. The Toshiba portable hard drive did work with my 2011 air with my friend's USB2 to microUSB2 cable so I decided to buy one on Amazon. Unfortunately, the cable that I bought from amazon did not work with my macbook air but it did work with my other pc.
    My question is: Does my macbook air have a usb problem and should I go to apple store to get it fixed?
    Thanks!

    There have been more than a few threads on this subject of the USB 3.0 Toshiba Canvio problems. Here is an ongoing rather current discussion of the issue.

  • Using javax.usb to read usb using java

    hai friends
    iam trying to read data from usb and i had tried over javax,usb package it asks for the implemntation og javax.usb.UsbServices interface. wt is the solution
    with regards hbk

    I want to do it in windows

  • Having t510 usb problems

    hello,
    We having t510 thin client usb problems its doesn't come up as anothe  drive.
    Carl

    Hi 
           Can you expand on what your asking . Does the USB have anything on it ?? I assume it's a flash stick ???
                                        Checkurtech
    ****Click the White Kudos star to say thanks****
    ****Please mark Accept As Solution if it solves your problem****

  • L505D-LS5001 no audio / no usb problem

    i been having problems with my audio and usb drive, allready try installing drivers  and nothing..
    the audio tells me no audio output installed.
    and the usb and sd card slot wont work eider.  runnning windows 7 32bit , audio driver is microsoft audio highdefiniton with the yellow (!)
    when i try to install laptops drivers go to the best drivers allready install.
    usb problem i really dont know whats  the problem..Laptop still on warranty.
    Any help please

    I have run into this same issue; it seems to occur that in device manager, no USB host is even present.   Audio just has a red "X" on it.
    I've tried installing the drivers, updates.
    I restored from the Restore discs from Toshiba (which just crash)
    I've done an install from a straight WIn7 X64 disc (which works, but then Red "X")
    I've tried changing memory, HDD..
    I've tried bootable LInux, which also doesn't see a USB controller.
    This is very annoying.  This seems to have happened after someone flashed the 1.10 BIOS onto this (I have an L505D-LS5007)
    Something here is very amiss, and a laptop with  no USB, no Audio is almost worthless.  It's as though the BIOS control for the southbridge is wrong.  I've tried re-flashing with 1.10, no difference.. I'd love to be able to rollback to 1.00, but I can't even find it.

  • Javax usb exception

    Hi All - I'm kinda new at this and looking for some help. I successfully compiled the program below to enumerate the USB bus, but when I run the program I get the errors (listed at the end). Where did I go wrong? Any help would much appreciated. Thank you
    ~~~~~~~~~~~~~
    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();
    UsbHub rootHub = services.getRootUsbHub();
    traverse(rootHub);
    } catch (Exception 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 {
    // This is a USB function, not a hub.
    // Do something.
    ~~~~~~~~~~~~~~
    # java TraverseUSB
    Exception in thread "main" java.lang.NoClassDefFoundError: javax/usb/UsbDevice
    Caused by: java.lang.ClassNotFoundException: javax.usb.UsbDevice
    at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:319)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:264)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:332)
    Could not find the main class: TraverseUSB. Program will exit.
    #

    You've probably forgotten to set the classpath.

Maybe you are looking for

  • How to look inside a jar?

    I am getting errors when using the sun deploytool. I think there is an ejb-jar.xml inside my ejb-jar file. how do i look at it?

  • Drag and Drop with JDK1.4

    Hi There, I want to write an application with an toolbar with a few icons on it. when I drag a icon and drop on a panel it should create a new component[may be a label or a textfield] and place it on the panel. I should be able to drag and drop n num

  • Attribute Change Run taking very Long time.

    Hi Experts: We are daily loading Master data from one common process chain. There are 33 Infoobjects which are getting activated in Attribute Change Run Process. This process is taking almost 3 hours to run daily; due to this it is impacting our othe

  • Upgrading iMovie from v9.0.9 to v10 with projects and events on external HD

    Seem to be running into an issue using iMovie v10 post-upgrade... I run iMovie v9.0.9 with many projects and events on several external (multi-TB) hard drives. They would not fit on my primary HD due to sheer file size. I was able to upgrade to v10,

  • Any Browser freezes when trying to add image finder pop-up

    Since updating to Mavericks, whenever I try to add images etc in ANY Browser, the finder popup freezes when I select Desktop for the image. I have found a work around, I created a folder, I called Images on the desktop, and when I copy any images etc