bonsoir;
tous simplement je veux creer un fichier txt avec j2me dans le C:\ en clickant sur un bouton , mais l'orsque j'interroge ce code avec netbeans m'affiche l'erreur suivante ("java.lang.IllegalArgumentException: Root is not specified")


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
try
      {
        OutputConnection connection = (OutputConnection) 
          Connector.open("file:///C:/myfile.txt", Connector.WRITE );
        OutputStream out = connection.openOutputStream();
        PrintStream output = new PrintStream( out );
        output.println( "This is a test." );
        out.close();
        connection.close();
        Alert alert = new Alert("Completed", "Data Written", null, null);
        alert.setTimeout(Alert.FOREVER);
        alert.setType(AlertType.ERROR);
        display.setCurrent(alert);
      }
      catch( ConnectionNotFoundException error )
       {
         Alert alert = new Alert(
              "Error", "Cannot access file.", null, null);
         alert.setTimeout(Alert.FOREVER);
         alert.setType(AlertType.ERROR);
         display.setCurrent(alert);
        }
        catch( IOException error )
        {
         Alert alert = new Alert("Error", error.toString(), null, null);
         alert.setTimeout(Alert.FOREVER);
         alert.setType(AlertType.ERROR);
         display.setCurrent(alert);
        }



stp si quelqu'un peux m'aidez a resoudre ce probleme
merci d'avance!