×

Discussion Board

Results 1 to 2 of 2

Thread: path ?????

  1. #1
    Registered User
    Join Date
    Mar 2003
    Posts
    3

    path ?????

    how can I get the path in which my application can read and write? I have my app so far that in the SUN emulator everything works fine. But as soon as I launch it with the emulator nothing works.
    Is there a solution to this which would work on every device so to say not device specific or even nokia specific?



    String filePath = GlobalFunctions.defaultFilePath;
    filePath = System.getProperty("java.class.path");

    if (GlobalFunctions.RunningTestEnviorement) {
    return filePath;
    }
    FileConnection fc = null;
    try {
    fc = (FileConnection) Connector.open("file://localhost/" + filePath);
    if (!fc.exists()) {
    fc.mkdir();
    }
    if (fc != null) {
    fc.close();
    }
    } catch (IOException ioe) {
    return null;
    }

  2. #2
    Registered User
    Join Date
    Dec 2005
    Location
    Brazil
    Posts
    1,884

    Re: path ?????

    Hi polarber,

    It seems that you're mistaken regarding JSR-75 (FileConnection Opt Pack) usage. You should not use "java.class.path" or localhost.

    Considering valid paths when using FileConnection, i advise you to check the tutorials and articles below:

    Getting Started with the FileConnection APIs
    http://developers.sun.com/techtopics...ion/index.html

    Introduction To The FileConnection API (With Example) v1.1
    http://www.forum.nokia.com/info/sw.n..._v1_1.zip.html

    Hope it helps!

    BR,

    Juarez Junior

Similar Threads

  1. Replies: 1
    Last Post: 2005-11-27, 21:08
  2. can't find header in user os system path include
    By stefano_campri in forum Symbian
    Replies: 0
    Last Post: 2005-10-27, 14:49
  3. GCC - file or path name too long
    By mharries in forum Symbian Tools & SDKs
    Replies: 0
    Last Post: 2003-07-28, 10:41
  4. nokia 7210 modem via IR doesn't work !
    By oussamaaiadi in forum PC Suite API and PC Connectivity SDK
    Replies: 1
    Last Post: 2003-03-06, 10:46

Posting Permissions

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