×

Discussion Board

Results 1 to 5 of 5
  1. #1
    Registered User
    Join Date
    Jan 2006
    Posts
    1

    How to append text in a text file in j2me

    hi

    i am working on NetBeans 4.1 IDE with Nokia tool kit.

    My problem is how to append the text in a text file that is the part of jar.

    i can read the text but when i am trying to write the trext a Secutiry

    Exception is occures that application is not Authorised to use restricted API.

    my real problem is How to write text in a text file in append mode on

    NetBeans 4.1 IDE with Nokia tool kit.


    my code is

    String uri="file:///root1/test1.txt";
    OutputConnection connection =
    (OutputConnection) Connector.open(uri,Connector.WRITE);
    OutputStream out = connection.openOutputStream();
    PrintStream output = new PrintStream(out);
    output.println("Testing to write text in file .....");
    out.close();
    connection.close();

    Plz help me........

  2. #2
    Registered User
    Join Date
    Dec 2005
    Posts
    9

    Re: How to append text in a text file in j2me

    Hello,
    I am not ablke to get what exactly your problem is. But still as per I understand, You are not ablr to edit your MIDLets.. My dear while yuo are using netbeans and hisg level interface there are cetrtain blocks of code that are blue colored. A blue colored block means a guarded block, You can't edit from within the editor so you must have to use properties for editing.

    Every other line of code, which is not blue colored can be edited using editor..

    Hope this will help you

    Cheers,
    rajender pasricha

  3. #3
    Registered User
    Join Date
    Jan 2006
    Posts
    11

    Re: How to append text in a text file in j2me

    Yeah, I suppose you aren't able to modify your jar file once your .jad file holds the .jar file's size

  4. #4
    Registered User
    Join Date
    Apr 2010
    Posts
    3

    Re: How to append text in a text file in j2me

    You have to sign the application with your security certificate. If you are using emulator, u can disable the security by giving security domain as trusted and run the application.

    Quote Originally Posted by lovely_334801 View Post
    hi

    i am working on NetBeans 4.1 IDE with Nokia tool kit.

    My problem is how to append the text in a text file that is the part of jar.

    i can read the text but when i am trying to write the trext a Secutiry

    Exception is occures that application is not Authorised to use restricted API.

    my real problem is How to write text in a text file in append mode on

    NetBeans 4.1 IDE with Nokia tool kit.


    my code is

    String uri="file:///root1/test1.txt";
    OutputConnection connection =
    (OutputConnection) Connector.open(uri,Connector.WRITE);
    OutputStream out = connection.openOutputStream();
    PrintStream output = new PrintStream(out);
    output.println("Testing to write text in file .....");
    out.close();
    connection.close();

    Plz help me........

  5. #5
    Super Contributor
    Join Date
    Apr 2007
    Posts
    2,708

    Re: How to append text in a text file in j2me

    I'm guessing that in the meantime (4 years !!!) he resolved his issue

Similar Threads

  1. Replies: 1
    Last Post: 2005-05-26, 14:22
  2. Replies: 1
    Last Post: 2004-03-14, 21:15
  3. C++, adding line break to text file
    By rampe29 in forum Symbian
    Replies: 2
    Last Post: 2002-06-18, 06:20
  4. Replies: 0
    Last Post: 2002-06-10, 12:24
  5. Unable to open a newly created text file?
    By yuva69 in forum Symbian
    Replies: 1
    Last Post: 2002-06-06, 14:09

Posting Permissions

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