×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Regular Contributor
    Join Date
    Mar 2003
    Location
    IL/USA
    Posts
    341

    Question FileConnection on Emulator

    Hi,

    When using Sun Java Wireless Toolkit I use the following code to create a file for writing;
    Code:
    FileConnection filecon = (FileConnection) Connector.open(
    		"file:///root1/" + fileName,
    		Connector.READ_WRITE);
    However, when running midlet on S60 3rd MIDP SDK Emulator the following exception dump occurs;
    Code:
    java.io.IOException: Opening a connection failed: -5
     - com.symbian.midp.io.protocol.file.FileConnectionImpl.open(), bci=234
     - com.symbian.midp.io.protocol.file.Protocol.openConnection(), bci=40
     - com.symbian.gcf.ProtocolBase.openConnection(), bci=159
     - com.symbian.gcf.GCFConnector.open(), bci=223
     - javax.microedition.io.Connector.open(), bci=4
     - javax.microedition.io.Connector.open(), bci=3
     - EmuDump.setupFile(), bci=20
    How does one create a file for writing and reading on Emulator? Namely, I think, what is needed is proper URL to specify for Connector.open(...) method.

    Thanks!
    Last edited by earamsey; 2008-09-25 at 18:49.
    Erica A Ramsey / Mobile Apps Developer /
    Resume ~ http://home.comcast.net/~erica.ramsey/CV
    Some Project Screenshots ~ http://home.comcast.net/~erica.ramsey/CV/screens.html

  2. #2
    Super Contributor
    Join Date
    Oct 2007
    Location
    Deva, Romania
    Posts
    3,471

    Re: FileConnection on Emulator

    Hi,

    I believe this post has the solution.

Similar Threads

  1. How To Make The S60 Emulator See My USB Bluetooth Dongle ?
    By Mo7ammed_01 in forum Bluetooth Technology
    Replies: 9
    Last Post: 2009-07-17, 02:33
  2. How to test file reading/writing and web server app in emulator?
    By SanjayKhuntia in forum Mobile Java General
    Replies: 6
    Last Post: 2008-09-09, 10:03
  3. Carbide.vs emulator hangs when debugging
    By jyrkiettila in forum Symbian Tools & SDKs
    Replies: 14
    Last Post: 2008-02-26, 17:22
  4. some problem when using network on emulator
    By xhsoldier in forum Symbian Networking & Messaging (Closed)
    Replies: 9
    Last Post: 2006-12-06, 06:16
  5. How To Make The S60 Emulator See My USB Bluetooth Dongle ?
    By Mo7ammed_01 in forum Symbian Networking & Messaging (Closed)
    Replies: 1
    Last Post: 2006-07-25, 00:12

Posting Permissions

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