| Reply | « Previous Thread | Next Thread » |
|
Hello together!
I am trying to write a textfile on a Nokia 6230i. I create the connection like that: FileConnection fc=(FileConnection)Connector.open(path,Connector.READ_WRITE); in the variable path I have the following value: file:///C:/Galerie/myfile.txt but I just get the following error: Security java/lang/SecurityException Access denied Can anybody tell me why? Thanks a lot for your help in advance. Markus |
| Markus1982 |
| View Public Profile |
| Find all posts by Markus1982 |
|
Hi Markus1982,
'SecurityException' thrown can be due to two reasons: 1. The MIDlet is not signed using a valid certificate. 2. All the required permissions are not given in the jad/manifest files. There are a lot of discussions with regard to 'MIDlet signing' and 'setting of permissions'. Please search the forum discussions for more info. Best Regards, Gracy |
|
Join Date: Aug 2006
Posts: 486
Location: Rawalpindi, Pakistan
nicenouman
Offline
Regular Contributor
|
|
There may be a third option that the folder ur trying to access to write ur file is not available for applications to read or write data at all like an inbox folder u dont have any access to it whatsoever.
Regards Nouman |
| nicenouman |
| View Public Profile |
| Find all posts by nicenouman |
|
Just to add : If your MIDlet is not signed, you will be getting permission request messages, you have to allow those permission messages, else also the Security exception may be thrown.
Regards Gopal __________________ MobiQuil.com An initiative by Developers for Developers. http://www.mobiquil.com - Alpha - Launched. |
|
I was having the same problem (Security Exception: Access Denied) with some emulators like 6230i and 5300, but it was working with S40 SDK emulators.
I think this problem come with some mobiles have some restriction on the paths. You may want try this path (It's working ) "file:///E:/myfile.txt" By the way you can get the roots Enumeration enu = FileSystemRegistry.listRoots(); while ( enu.hasMoreElements() ) append(enu.nextElement().toString(), null); |
| michaelska |
| View Public Profile |
| Find all posts by michaelska |
| Reply | « Previous Thread | Next Thread » |
| Thread Tools | Search this Thread |
|---|---|
| Thread | Thread Starter | Forum | Replies | Last Post |
|---|---|---|---|---|
| Compare() works in emulator but doesn't work in phone | yencruz | General Symbian C++ | 2 | 2004-04-27 11:36 |
| CommConnection does not work with Series 60 SDK, but works in JWT | jackiechan2001 | Mobile Java Tools & SDKs | 1 | 2004-02-04 10:07 |
| Does SDK v2.0 work on Series60 V6.1? | liying | Symbian Tools & SDKs | 3 | 2004-02-02 09:57 |
| does irda function work with the emulator ? | IGhost | General Symbian C++ | 0 | 2002-12-07 18:43 |
| 8310 Simulator doesn't work | DickJones | General Browsing | 1 | 2002-11-11 13:55 |