This discussion is archived
10 Replies Latest reply: Mar 12, 2009 4:01 AM by PhHein RSS

File Handling with J2ME

843851 Newbie
Currently Being Moderated
The following Line always gives throws the Exception / Error

OutputConnection connection = (OutputConnection)"file://c:/myfile.txt;append=true", Connector.WRITE );

Throws the Exception :
java.lang.IllegalArgumentException: Root is not specified
     at fileconnection.commandAction(+34)
     at javax.microedition.lcdui.Display$DisplayAccessor.commandAction(+282)
     at javax.microedition.lcdui.Display$DisplayManagerImpl.commandAction(+10)
     at com.sun.midp.lcdui.DefaultEventHandler.commandEvent(+68)
     at com.sun.midp.lcdui.AutomatedEventHandler.commandEvent(+47)
     at com.sun.midp.lcdui.DefaultEventHandler$

All i want to do is.., to write a simple string into a file using j2me
some one please help me... !!!