Salut!!

Je fais un ptit programme qui doit permettre de connaître la version d'implémentation ou de spécification d'un jar...
Le principe est le suivant:
a partir du chemin complet d'un jar, mon programme lit le manifest et retourne la version d'implémentation ou de spécification (selon demande) inscrite dans le manifest si précisée.

J'arrive très bien a le faire avec un MANIFEST simple de type:

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
Specification-Vendor: Sun Microsystems, Inc.
Implementation-Vendor: Sun Microsystems, Inc.
Specification-Version: 1.2
Implementation-Version: Tue Jun 27 00:22:48 PDT 2000 3594461704 40
Implementation-Title: com.sun.jndi.fscontext
Mais avec un MANIFEST du type:

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
Manifest-Version: 1.0
Created-By: 1.2 (Sun Microsystems Inc.)
 
Name: com/sun/jndi/toolkit/ctx/
Specification-Title: JNDI Service Provider Utilities
Specification-Vendor: Sun Microsystems, Inc.
Implementation-Vendor: Sun Microsystems, Inc.
Specification-Version: 1.2
Implementation-Version: Tue Jun 27 00:10:34 PDT 2000 3594461704 40
Implementation-Title: com.sun.jndi.toolkit.ctx
 
Name: com/sun/jndi/url/jndi/
Specification-Title: JNDI Service Provider Utilities
Implementation-Version: Tue Jun 27 00:10:34 PDT 2000 3594461704 40
Specification-Vendor: Sun Microsystems, Inc.
Specification-Version: 1.2
Implementation-Title: com.sun.jndi.url.jndi
Implementation-Vendor: Sun Microsystems, Inc.
 
Name: com/sun/jndi/toolkit/chars/
Specification-Title: JNDI Service Provider Utilities
Implementation-Version: Tue Jun 27 00:10:34 PDT 2000 3594461704 40
Specification-Vendor: Sun Microsystems, Inc.
Specification-Version: 1.2
Implementation-Title: com.sun.jndi.toolkit.chars
Implementation-Vendor: Sun Microsystems, Inc.
Je n'y arrive pas... Je ne sais pas comment gérer ce type de main, je ne sais pas comment gérer le Name... dans ce cas j'aimerai pouvoir récupérer les version pour chaque section...
Quelqu'un sait-il comment faire?

Merci merci