Bonjour,

J'aimerai savoir comment faire un fichier jar qui contiendrai plusieurs librairie jar (en fait 2). En effet pour que mon projet fonctionne sous netbeans je clique sur run (dont j'ai configuré les options dans le "Project Porperties", et voici ce que cela me donne le run sous netbeans :
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
ant -f /home/system/Mercury_API/mercuryapi-1.27.3.16/java/samples_nb -Dnb.internal.action.name=run run
init:
Deleting: /home/system/Mercury_API/mercuryapi-1.27.3.16/java/samples_nb/build/built-jar.properties
deps-jar:
Updating property file: /home/system/Mercury_API/mercuryapi-1.27.3.16/java/samples_nb/build/built-jar.properties
mercuryapi_nb.init:
mercuryapi_nb.deps-jar:
Updating property file: /home/system/Mercury_API/mercuryapi-1.27.3.16/java/samples_nb/build/built-jar.properties
mercuryapi_nb.compile:
To run this application from the command line without Ant, try:
java -cp "/home/system/Mercury_API/mercuryapi-1.27.3.16/java/ltkjava-1.0.0.6.jar:/home/system/Mercury_API/mercuryapi-1.27.3.16/java/mercuryapi_nb/dist/mercuryapi_nb.jar" samples.demo
mercuryapi_nb.jar:
compile:
run:
EPC:000000000000228510000285 ant:1 count:1 time:2016-08-31T11:40:43.982+0200 RSSI: -57 Phase: 112
EPC:000000000000000013781157 ant:2 count:1 time:2016-08-31T11:40:44.016+0200 RSSI: -57 Phase: 118
EPC:000000000000228510000285 ant:2 count:1 time:2016-08-31T11:40:44.023+0200 RSSI: -65 Phase: 104
EPC:000000000000000000001843 ant:2 count:1 time:2016-08-31T11:40:44.029+0200 RSSI: -59 Phase: 87
Voici la commande à taper dans un terminal linux :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
/home/system/Mercury_API/mercuryapi-1.27.3.16/java/samples_nb/dist
system@rfid:~/Mercury_API/mercuryapi-1.27.3.16/java/samples_nb/dist$ java -cp samples_nb.jar:../../mercuryapi.jar:../../ltkjava-1.0.0.6.jar samples.read tmr:///dev/ttyUSB0 --ant 1,2
EPC:000000000000000013781157 ant:2 count:1 time:2016-08-31T17:21:41.738+0200 RSSI: -60 Phase: 123
EPC:000000000000000000001843 ant:2 count:1 time:2016-08-31T17:21:41.744+0200 RSSI: -58 Phase: 87
EPC:000000000000000013781157 ant:2 count:1 time:2016-08-31T17:21:41.800+0200 RSSI: -60 Phase: 120
EPC:000000000000000000001843 ant:2 count:1 time:2016-08-31T17:21:41.804+0200 RSSI: -58 Phase: 87
J'aimerais obtenir un fichier jar dont nous n'aurions qu' à taper :
java -jar file.jar tmr:///dev/ttyUSB0 --ant 1,2


Merci de votre aide.