Hi i am new in this forum and my english is not the best (i am sorry
G)
My OS is: Ubuntu
IDE: Eclipse
I added the three jsr80 jar files into my Project Build File and imported the javax.usb.properties file
I wanted to test this Code
import java.util.Properties;
import javax.usb.UsbException;
import javax.usb.UsbHostManager;
import javax.usb.UsbHub;
import javax.usb.UsbServices;
public class usb {
public usb() {
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();
}
}
public static void main(String[] args) {
usb obj=new usb();
}
}
//I copied it from this forum - thx to the User who writes it first **G*
I get the Errors:
Exception in thread "main" java.lang.NoClassDefFoundError: javax/usb/UsbServices
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
at java.net.URLClassLoader.access$000(URLClassLoader.java:56)
at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at java.lang.ClassLoader.loadClass(ClassLoader.java:299)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:169)
at javax.usb.UsbHostManager.createUsbServices(Unknown Source)
at javax.usb.UsbHostManager.getUsbServices(Unknown Source)
at usb.<init>(usb.java:10)
at usb.main(usb.java:22)
I want to code a little application for a gps device (Garmin etrex vista hcx) , maybe someone has experience with it and give me some tipps ;)
with best regreets Castor_Troy
Edited by: Castor_Troy on Feb 6, 2008 8:11 PM