Quote:
Originally Posted by rpearson
I am new to J2ME programming. I finally got a program transferred to my Sony Ericsson w300i phone, installed, and running. I copied the .jar and .jad files to my "Other" folder, and installed it into the "Applications" folder. It runs.
But what I really want to do is now transfer a text data file to the phone periodically, and have the program read data from that file. I have transferred the text file to the "Other" folder, but I am not able to read from the file. I have tried:
FileConnection fc = (FileConnection)
Connector.open("file:///c:/text.txt",Connector.READ);
FileConnection fc = (FileConnection)
Connector.open("file:///c:/other//text.txt",Connector.READ);
FileConnection fc = (FileConnection)
Connector.open("file:///c:/Other//text.txt",Connector.READ);
and many other combinations. I keep getting a SecurityException. I think that I just don't know where to put the text file, or how to refer to it, but there could be some other permissions problem that I don't know about.
Unfortunately, the documentation on all of this is not good. I surely appreciate any help that anyone can provide.
Rodney Pearson
rodney.pearson@msstate.edu
Might be possible that u have not set the permissions to read or write the file
First set the permissions from Toolkit>>Settings>>Permissions
the save the file u want to read in root directory
my root directory is at C:\WTK25\appdb\DefaultColorPhone\filesystem\root1
and then try this
FileConnection fc = (FileConnection)
Connector.open("file:///root1/filename.extension",Connector.READ);
.