Bonjour.

Je devrais utiliser javax.usb, mais je n'arrive pas à le faire fonctionner !

En effet, à la compilation du troisième build.xml (~/javax-usb-ri-linux_1.0.1/build.xml), j'ai droit à un max d'erreurs...

Je tourne sur Ubuntu Feisty, et je suis un parfait noob de Linux.

Voici une partie de ce qui s'affiche, aprés "ant all" :

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
redfish@redfish:~/javax-usb-ri-linux_1.0.1$ ant all
Buildfile: build.xml
 
clean:
     [echo] Cleaning everything.
   [delete] Deleting 25 files from /home/redfish/javax-usb-ri-linux_1.0.1/src
   [delete] /home/redfish/javax-usb-ri-linux_1.0.1/docs/jdoc not found.
     [exec] rm -f libJavaxUsb.so JavaxUsbKernel.o JavaxUsbLog.o JavaxUsbTopologyUpdater.o JavaxUsbTopologyListener.o JavaxUsbActive.o JavaxUsbDeviceProxy.o JavaxUsbPipeRequest.o JavaxUsbInterfaceRequest.o JavaxUsbControlRequest.o JavaxUsbBulkRequest.o JavaxUsbInterruptRequest.o JavaxUsbIsochronousRequest.o JavaxUsbError.o com_ibm_jusb_os_linux_JavaxUsb.h *.o *.so
 
compile:
     [echo] Compiling class files.
    [javac] Compiling 17 source files to /home/redfish/javax-usb-ri-linux_1.0.1/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/usr/lib/jvm/java-1.5.0-sun-1.5.0.11//include -I/usr/lib/jvm/java-1.5.0-sun-1.5.0.11//include/linux  -Wall   -c JavaxUsbKernel.c
     [exec] Dans le fichier inclus à partir de com_ibm_jusb_os_linux_JavaxUsb.h:2,
     [exec]           à partir de JavaxUsb.h:14,
     [exec]           à partir de JavaxUsbKernel.c:11:
     [exec] /usr/lib/jvm/java-1.5.0-sun-1.5.0.11//include/jni.h:21:19: erreur: stdio.h : Aucun fichier ou répertoire de ce type
     [exec] In file included from com_ibm_jusb_os_linux_JavaxUsb.h:2,
     [exec]                  from JavaxUsb.h:14,
     [exec]                  from JavaxUsbKernel.c:11:
     [exec] /usr/lib/jvm/java-1.5.0-sun-1.5.0.11//include/jni.h:1862: erreur: expected ‘)’ before ‘*’ token
     [exec] /usr/lib/jvm/java-1.5.0-sun-1.5.0.11//include/jni.h:1863: erreur: expected ‘;’ before ‘void’
 
...
...
je vous passe la quantité d'erreurs...
...
...
 
     [exec] JavaxUsbKernel.c: In function ‘getInterruptType’:
     [exec] JavaxUsbKernel.c:92: erreur: ‘USBDEVFS_URB_TYPE_INTERRUPT’ undeclared (first use in this function)
     [exec] JavaxUsbKernel.c:93: attention : control reaches end of non-void function
     [exec] make: *** [JavaxUsbKernel.o] Erreur 1
 
BUILD FAILED
/home/redfish/javax-usb-ri-linux_1.0.1/build.xml:116: exec returned: 2
Quelqu'un le comprend ?