×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Aug 2009
    Posts
    36

    JSR 75 Problem: missing built in methods create(),mkdir(), close() and etc.

    Good day everyone! I am using netbeans IDE 6.7.1 with jdk 6 update 14. I want to ask why I cant use the method create(),mkdir(),close() in FileConnection API. Because I tried this code:

    public void createFile() {
    try {
    FileConnection filecon = (FileConnection)
    Connector.open("file:///SDCard/mynewfile.txt");
    // Always check whether the file or directory exists.
    // Create the file if it doesn't exist.
    if(!filecon.exists()) {
    filecon.create();
    }
    filecon.close();
    } catch(IOException ioe) {
    }
    }

    And it seems that it cannot find the methods and I got compilation error. I just wonder why, because it seems that it is available in fileconnection api and i needed this method in what i am working right now. Thank you very much and i really appreciate someone who can help.

  2. #2
    Nokia Developer Champion
    Join Date
    Feb 2009
    Location
    Noida, India
    Posts
    3,085

    Re: JSR 75 Problem: missing built in methods create(),mkdir(), close() and etc.

    In your project properties you will require to set the dependency on JSR-75 FileConnection API and import javax.microedition.io.file.*;
    thanks,
    ~Amitabh
    (Champion of the Month -Aug'13)
    Follow me on my blog for Innovative Mobile Apps

Similar Threads

  1. JSR 75 Problem
    By kenichi24 in forum Mobile Java General
    Replies: 2
    Last Post: 2010-08-15, 11:02
  2. JSR - 75 Create Directory
    By roger.kock in forum Mobile Java General
    Replies: 7
    Last Post: 2009-01-16, 09:31
  3. JSR-75 PIM Problem
    By nebuhcaneza in forum Mobile Java General
    Replies: 1
    Last Post: 2009-01-16, 04:15
  4. JSR-75 missing numbers in 6500
    By hrdonka in forum Mobile Java General
    Replies: 0
    Last Post: 2007-12-11, 14:51
  5. Cannot create file with JSR-75. Help me please..
    By ryo_mokkori_saeba in forum Mobile Java Tools & SDKs
    Replies: 5
    Last Post: 2006-02-08, 02:59

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×