The <usb.h> file is a completely different file, provided by libusb,
while <linux/usb.h> is the header file from the kernel.  Unfortunately
the kernel guys keep changing it and in the latest kernels what we
need is scattered across different files.  So I think we will have to
do what the libusb guys did, and just hardcode what we need into our
own file.  If the libusb header file works for you for now, use it.

The compile warnings look like the JNI interface has changed.  Can you
try building with Java 1.5 and see if it still complains?

I have no idea what your problem is as far as not being able to import
javax.usb.*;  That is a basic java thing, if you can't do that then
the problem is not with javax.usb.

On Nov 6, 2007 6:39 PM, David Sere <[EMAIL PROTECTED]> wrote:
> Hello,
>
> i just spent the last 20 hours with trying to compile javax.usb :D
>
> well as far as i came i have compiled the API and the common RI without any
> problems. now comes the part thats giving me the headache:
>
> After the first errors i had to change the path to usb.h from <linux/usb.h>
> to <usb.h> in the JavaxUsbKernel.h, which made possible to sucessfully build
> the ri-linux, but with a lot of warnings. the output was huge, so i post the
> snippets that might be interesting:
>
> [echo] Compiling class files.
>     [javac] Compiling 17 source files to
> /home/d53r3/javaxusb/javax-usb-ri-linux/src
>     [javac] Note: Some input files use unchecked or unsafe operations.
>     [javac] Note: Recompile with -Xlint:unchecked for details.
>      [echo] Compiling JNI library.
>      [exec] gcc -I/home/d53r3/jdk1.6.0_03/include
> -I/home/d53r3/jdk1.6.0_03/include/linux  -Wall   -c JavaxUsbKernel.c
>      [exec] gcc -I/home/d53r3/jdk1.6.0_03/include
> -I/home/d53r3/jdk1.6.0_03/include/linux  -Wall   -c JavaxUsbLog.c
>      [exec] gcc -I/home/d53r3/jdk1.6.0_03/include
> -I/home/d53r3/jdk1.6.0_03/include/linux  -Wall   -c
> JavaxUsbTopologyUpdater.c
>      [exec] JavaxUsbTopologyUpdater.c: In function
> 'Java_com_ibm_jusb_os_linux_JavaxUsb_nativeTopologyUpdater':
>      [exec] JavaxUsbTopologyUpdater.c:36: warning: passing argument 2 of
> 'debugGetObjectClass' discards qualifiers from pointer target type
>      [exec] JavaxUsbTopologyUpdater.c:37: warning: passing argument 2 of
> 'debugGetMethodID' discards qualifiers from pointer target type
>      [exec] JavaxUsbTopologyUpdater.c:39: warning: passing argument 2 of
> 'debugDeleteLocalRef' discards qualifiers from pointer target type
>      [exec] JavaxUsbTopologyUpdater.c:86: warning: passing argument 2 of
> 'debugDeleteLocalRef' discards qualifiers from pointer target type
>
> i get the "passing argument 2 warning" when compiling:
>
> JavaxUsbTopologyUpdater.c
> JavaxUsbTopologyListener.c
> JavaxUsbActive.c
> JavaxUsbPipeRequest.c
> JavaxUsbInterfaceRequest.c
> JavaxUsbControlRequest.c
> JavaxUsbBulkRequest.c
> JavaxUsbInterruptRequest.c
> JavaxUsbIsochronousRequest.c
> JavaxUsbError.c
>
> i have uploaded the entire output here:
> http://bm-mrs.servebeer.com/ant_output.txt
>
> so, after adding all 3 jars and the javax.usb.properties directory to my
> CLASSPATH environment variable and copying the .so file to my /usr/lib/
> directory i get this when i try to build theDefaultControlPipe example
> program:
>
> ----------
> 1. ERROR in DefaultControlPipe.java (at line 12)
>         import javax.usb.*;
>                ^^^^^^^^^
> The import javax.usb cannot be resolved
> ----------
> 2. ERROR in DefaultControlPipe.java (at line 13)
>         import javax.usb.util.*;
>                ^^^^^^^^^
> The import javax.usb cannot be resolved
> ----------
> 3. ERROR in DefaultControlPipe.java (at line 26)
>         UsbHub virtualRootUsbHub = ShowTopology.getVirtualRootUsbHub();
>         ^^^^^^
> UsbHub cannot be resolved to a type
> ----------
> 4. ERROR in DefaultControlPipe.java (at line 26)
>         UsbHub virtualRootUsbHub = ShowTopology.getVirtualRootUsbHub ();
>                                    ^^^^^^^^^^^^
>
> and so on. it cant resolve anything from the javax.usb package, it does the
> same wether the jars are in the CLASSPATH env variable or not.
> Tried to but the jars and javax.usb.properties in the jre/lib/ext/ folder.
> reducing the errors to 3:
>
> ----------
> 1. ERROR in DefaultControlPipe.java (at line 26)
>         UsbHub virtualRootUsbHub = ShowTopology.getVirtualRootUsbHub();
>                                     ^^^^^^^^^^^^
> ShowTopology cannot be resolved
> ----------
> 2. ERROR in DefaultControlPipe.java (at line 27)
>         List allUsbDevices =
> FindUsbDevice.getAllUsbDevices(virtualRootUsbHub);
>                              ^^^^^^^^^^^^^
> FindUsbDevice cannot be resolved
> ----------
> 3. ERROR in DefaultControlPipe.java (at line 28)
>         List usbHubs =
> FindUsbDevice.getUsbDevicesWithDeviceClass(virtualRootUsbHub,
> UsbConst.HUB_CLASSCODE);
>                        ^^^^^^^^^^^^^
> FindUsbDevice cannot be resolved
> ----------
> 3 problems (3 errors)
>
> Please help me and many thanks in advice :)
> Sincerely,
>
> Sere David
> ABM Tech. Vienna
>
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc.
> Still grepping through log files to find problems?  Stop.
> Now Search log events and configuration files using AJAX and a browser.
> Download your FREE copy of Splunk now >> http://get.splunk.com/
> _______________________________________________
> javax-usb-devel mailing list
> javax-usb-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/javax-usb-devel
>
>

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
javax-usb-devel mailing list
javax-usb-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/javax-usb-devel

Reply via email to