hi, where will i find this specific directory? i used "fileconn.dir.private" as my path..please help me..i created a new folder on my PACKAGE.. how do i access it? how do i read and write files on it? please i need help... thanks
hi, where will i find this specific directory? i used "fileconn.dir.private" as my path..please help me..i created a new folder on my PACKAGE.. how do i access it? how do i read and write files on it? please i need help... thanks
Last edited by binsint; 2011-01-06 at 04:36.
http://library.forum.nokia.com/topic...79F5BE26E.html
what do you mean "created new folder on my PACKAGE"?
If you have some files inside your MIDlet, you can access those with method getResourceAsStream() not with JSR-75
Hartti
i am using netbeans 6.9.1 IDE .. i created a new folder to be included on my JAR file. i placed my text file in this folder. i want this folder to be installed together with my JAR file. the problem is i dont know how to access it. i dont know how to read and write on the files. thank you for the reply hartti.
Last edited by binsint; 2011-01-06 at 08:38.
Useful info/examples for you in the wiki: http://wiki.forum.nokia.com/index.ph.../Data_Articles
Ok, so you want to store the file inside your MIDlet as a resource. use getResourceAsStream() with the path inside your MIDlet. Forget fileconn.dir.private.
Also note that in your MIDlet you can only read these resource files, not edit or write them
Hartti
thanks... what is the path of my midlet? im so confused with the paths.i see other similar threads and i see file:///c:/, others are file:///localhost. what is the exact path of my midlet and my res folder?thanks
how do i use getResourceAsStream() with the path inside my Midlet? lets say my midlet is SAMPLEMidlet,please give me the code on applying the getResourceAsStream()
thank you so much!
the path?
Depending on your project settings either /filename.here or /res/filename.here (where filename.here is the name of your file)
You could easily check that you by opening your MIDlet with "Zip-reader app" as it is after all a renamed zip file.
One complete code example here
http://wiki.forum.nokia.com/index.ph...e_line_by_line
Hartti