×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Dec 2005
    Posts
    4

    Question Error in opening file connection

    I am getting Exception in following lines of code. can any one help me in finding the error

    run:
    Starting emulator in execution mode
    Could not connect to NCF!
    Emulator command: C:\Nokia\Devices\Nokia_Prototype_SDK_2_0\devices\Prototype_2_0_S40_MIDP_Emulator\bin\midp.exe -Xdescriptor "C:\Documents and Settings\Administrator\Local Settings\Temp\nbrun30145\File.jad"
    java.lang.IllegalArgumentException: Malformed file location

    code:

    OutputConnection connection = (OutputConnection)
    Connector.open("file://C:/myfile.txt", Connector.WRITE );
    System.out.println("connection extablished");
    OutputStream out = connection.openOutputStream();
    PrintStream output = new PrintStream( out );
    output.println( "This is a test." );
    out.close();
    connection.close();
    Alert alert = new Alert("Completed", "Data Written", null, null);
    alert.setTimeout(Alert.FOREVER);
    alert.setType(AlertType.ERROR);
    display.setCurrent(alert);

  2. #2
    Nokia Developer Champion
    Join Date
    Mar 2005
    Location
    Paris
    Posts
    814

    Re: Error in opening file connection

    try :
    "file:///C:/myfile.txt"

    with 3 /

Similar Threads

  1. SOS problem opening file session :(
    By chishti.hameed in forum Symbian C++
    Replies: 2
    Last Post: 2005-05-06, 08:20
  2. Alternate way to file connection??
    By balagopalks in forum Mobile Java General
    Replies: 1
    Last Post: 2005-01-13, 13:03
  3. Help !about .mbm的形成
    By wangguoshui in forum Symbian
    Replies: 4
    Last Post: 2004-12-23, 03:37
  4. Series60 SDK and opening GPRS connection
    By juhatar in forum Symbian Networking & Messaging (Closed)
    Replies: 3
    Last Post: 2003-07-31, 15:37
  5. Wireless Messaging API for 3650 - opening sms connection
    By jezovec in forum Mobile Java General
    Replies: 1
    Last Post: 2002-12-04, 11:49

Posting Permissions

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