Hi all,
I am Mudit Gupta, working on a project using j2me.I am using motorola A1200 for my project. I downloaded your application and it worked fine.
But when i am running my application, reading the file using JSR75 giving me error. i changed the permission, but still i am getting error.
My source code is --
FileConnection fc = (FileConnection) Connector.open("file:///MemoryStick/help.txt");
System.out.println("Trying to open a file in read mode");
//System.out.println("File Created in Write Mode....");
if(!fc.exists())
{
throw new IOException("File does not exists");
}
if(System.getProperty("com.motorola.file.access") == null)
{
System.out.println("File READ not allowed");
}
InputStream is = fc.openInputStream();
StringBuffer sofar = new StringBuffer();
byte c;
//int length = is.read(c, 0, 1024);
while ((c = (byte)is.read()) != -1)
{
sofar.append((char)c);
}
is.close();
fc.close();
viewer = new TextField("View File: " + sofar, null, 1024,
TextField.ANY | TextField.UNEDITABLE);
Error "The application has expectedly quit. Contact the application provider to resolve the issue. 0"







Reply With Quote