×

Discussion Board

Results 1 to 5 of 5
  1. #1
    Registered User
    Join Date
    May 2003
    Posts
    8

    Read files from directory

    Hi all, i have writing a small and simple MIDlet for reading textfiles and show it on a form on the phone.
    But now will I have to copy a textfile in the directory /res and the programm will automaticly read the textfile and show the inclusion from him.
    But where is the directory /res on the phone. How can I copy a textfile in there?
    When I install the MIDlet on the pfone I didn't see the directories:-(
    Where are the directories?

    How can I do it?

    Thanks:-)

  2. #2
    Registered User
    Join Date
    Jul 2003
    Location
    Finland, Tampere
    Posts
    1,113
    There are no directories. You can place your files to JAR file (there you can create some directory like structure) and access them using Class.getResourceAsStream()

  3. #3
    Registered User
    Join Date
    May 2003
    Posts
    8

    Read files from directory

    Hi, but can I load a new textfile after the instllation from the jar file and the MIDlet will read this file?

    Thanks.

  4. #4
    Registered User
    Join Date
    Jul 2003
    Location
    Finland, Tampere
    Posts
    1,113
    Sorry, your question is not clear for me.

    If you mean whether you can archive everything to jar, then install it to the phone and then read your file from MIDlet, then yes, you can do it

  5. #5
    Super Contributor
    Join Date
    Mar 2003
    Location
    Israel
    Posts
    2,280
    Hi, but can I load a new textfile after the instllation from the jar file and the MIDlet will read this file?
    You can't. The "sandbox" model won't let you. Only viable solution is to have the MIDlet download the new files from a server through an http connection.

    shmoove

Posting Permissions

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