Bonjour a tous

voila j'ai fini mon application java je la test sa marche nickel mais une fois Build y a un petit Hic.

quand j’exécute mon application appli\dist\appli.jar : elle ce lance normal mais j'ai un bouton qui Recherche des PortsSeries valable sur le pc il trouve Rien !!!

en revanche si je lance mon appli en cmd> Java -jar appli\dist\appli.jar : la tous fonctionne normal

j'ai re Build mon projet en compilant avec -Xlint:unchecked
je reçois un warning du genre : warning: [unchecked] unchecked call to put(K,V) as a member of the raw type java.util.HashMap portMap.put(curPort.getName(), curPort); 1 warning

voiçi ma methode :

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
 
 
    public Enumeration ports = null;
 
    public HashMap portMap = new HashMap();
public void searchForPorts()
    {
 
        ports = CommPortIdentifier.getPortIdentifiers();
 
        while (ports.hasMoreElements())
        {
            CommPortIdentifier curPort = (CommPortIdentifier)ports.nextElement();
 
            //get only serial ports
            if (curPort.getPortType() == CommPortIdentifier.PORT_SERIAL)
            {
 
                window.cboxPorts.addItem(curPort.getName());
                portMap.put(curPort.getName(), curPort);
            }
        }
    }

c'est quoi le problème a votre avis ?