You Are Here:

Community: Developer Discussion Boards

#1 Old Angry FileSystemRegistry.listRoots(); doesn't work - 2007-02-18, 19:55

Join Date: Feb 2007
Posts: 3
Markus1982
Offline
Registered User
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
Reply With Quote

#2 Old Re: FileSystemRegistry.listRoots(); doesn't work - 2007-02-19, 08:23

Join Date: Oct 2005
Posts: 50
gracyvk
Offline
Regular Contributor
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
Reply With Quote

#3 Old Re: FileSystemRegistry.listRoots(); doesn't work - 2007-02-21, 08:03

Join Date: Aug 2006
Posts: 486
Location: Rawalpindi, Pakistan
Send a message via MSN to nicenouman
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
Reply With Quote

#4 Old Re: FileSystemRegistry.listRoots(); doesn't work - 2007-02-21, 11:26

Join Date: Nov 2003
Posts: 3,641
Location: Bangalore , India
Send a message via Yahoo to balagopalks
balagopalks's Avatar
balagopalks
Offline
Forum Nokia Expert
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.
Reply With Quote

#5 Old Thumbs up Re: FileSystemRegistry.listRoots(); doesn't work - 2007-03-07, 14:09

Join Date: Mar 2007
Posts: 1
michaelska
Offline
Registered User
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);
Reply With Quote
Reply « Previous Thread | Next Thread »
Display Modes
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules

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

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Forum Jump
Similar Threads
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

Rate This

 
Bookmark this page: DeliciousDiggFacebookGoogleYahooStumbleUponRedditDiigoTechnocratiTwitter  Share this page Share this page Print this Page Print this page Invite a friend Invite a friend
京ICP备05048969号    Email Newsletters Press Terms & Conditions Privacy Policy Sitemap Contact Us © 2009 Nokia