title: Write a File in Phone Memory using J2ME
body: <p>I have just downloaded the Samsung SDK 1.2 for Java Development.</p>
  
  <p>Now, it's pure based J2ME architecture, so I have a requirement to store some files inside the memory for my application usage.</p>
  
  <p>That file can have a .csv extension, so for that I have tried JSR 75's FileConnection class with following piece of code :</p>
  
  <pre><code>try {
              FileConnection fconn = (FileConnection) Connector.open("file:///CFCard/newfile.txt");
              if (!fconn.exists()) {
                  fconn.create();  // create the file if it doesn't exist
              }
              fconn.close();
          } catch (IOException ioe) {
              System.out.println("exception = "+ioe);
          }
  </code></pre>
  
  <p>But in this case, it's giving me following exception :</p>
  
  <pre><code>exception = java.io.IOException: Root is not accessible 
  </code></pre>
  
  <p>So, I don't exactly, I am on the right track or not..</p>
  
  <p>Thanks in advance.</p>