Problem in creating file in j2me

Hi
i am novice in j2me and i am facing a problem in creating file in j2me.
i am using this code to make the file on my c drive.
try {
FileConnection fc = (FileConnection) Connector.open("file:///c:/sms.txt");
if (isDirectory) {
fc.mkdir();
} else {
fc.create();
but its not create any file on my c drive plz tell me where i wrong in this code and what should i do to create file on my c:/ drive.
plz help me thanks in advance..

Hi u can do it like this
FileConnection fc = (FileConnection) Connector.open("file:///root1/sms.txt");
This will create a file called sms.txt in the root1 directory which is the default root directory in everyphone and u can find this directory on ur PC in the WTK folder\appdb\DefaultColorPhone\filesystem\root1 asumming that u r using the DefaultColorPhone as ur emulator
Regards
Sagar

Similar Messages

  • Problem in creating file on local machine

    Hello everbody...
    i m using forms and reports 6i
    i m creating file out_file := Text_IO.Fopen(:filepath || '.csv', 'a'); using this command in before_report trigger. And closing file in after_report trigger.
    here filepath is = \\IP address of local machine\d$\file name
    now problem is that if i m giving IP address of local machine then its giving error ORA-39856.
    And if i m giving IP address of server machine then it is going to create file on server machine from local machine.
    Why its not creating file on client machine?
    i think there r problems related to rights
    can anyone has solution then please tell me

    yes in report there is report output and with that it also creating file in coding by
    out_file := Text_IO.Fopen(:filepath || '.csv', 'w');
    this open stmt is written in before report trigger
    Below lines r written for each row thats fetch by report main query.
    str := rpad(:apt_bil_no,8,' ') || ',' || lpad(:apt_bil_dt,10,' ') || ',"' ||
                   rpad(:supl_name,30,' ') || '",' || rpad(:supl_tin_no,11,' ') || ',' ||
                   rpad(:aptvat_hsn_no,10,' ') || ',' ||
                   lpad(ltrim(to_char((apt_amt2 - apt_vat_amt2),'999999990.00')),12,' ') || ',' ||
                   lpad(apt_vat_amt2,12,' ') || ',' ||
                   lpad(ltrim(to_char(apt_amt2,'999999990.00')),12,' ');
    Text_IO.Put(out_file, str);
    Text_IO.New_Line(out_file);
    file is closing in after report trigger.
    text_io.fclose(out_file);
    now i wants to create this file on local machine.
    yes using report server and its started window service.
    can u have any idea?

  • [File] Problem while creating files with long pathnames

    Hello everybody
    I'm trying to create File objects corresponding to physical files. These files have very long pathnames because they are located in directories tree with large depth. So, my pathname conatins a lot of directories plus the name of the file itself.
    It seems, that there is a limitation in the length of the pathname that I pass to the File constructor because files with small pathnames are OK bu the ones with very large pathnames cannot be created.
    I tried the different File constructors (File(String pathname) and File(File parent, String childname)) but it still does not work. Even if the second constructor is a little bit better as it succeeds on files where the first constructor failed. But still, it's not enough.
    Please Help!
    Thank you
    Hugo

    RESOLVED!
    The problem was from the OS itself (Windows XP) which accepts at most 255 characters long path names.

  • Problem of create file

    Hello everyone.
    I want to create file ,and the content of the file can refurbish in a two days.
    What should I do ?
    Thanks.

    Hi liying,
    I'm not sure I understand what you mean by "refurbish", so please let me know if misunderstood the question.
    Do you want to keep appending to a file in the beginning of the period and then after a specified time (you say two days) start overwriting the file from the beginning? This is basically a circular buffer using a file as the memory. All you have to do is control where in the fle you want to write to. For that purpose, use the "pos mode" and "pos offset" inputs of the Write Fi;e function. As you can see below, the help for this function describes how to use these inputs:
    Have fun!Message Edited by Philip C. on 06-02-2005 09:53 PM
    - Philip Courtois, Thinkbot Solutions
    Attachments:
    FilePosition.PNG ‏18 KB

  • Create files in j2me

    Hello, i've got a problem.
    when i execute this code in the Java Studio Mobility,
    OutputStream os = (OutputStream)Connector.open("file:myfile.txt");
    but i get this error:
    java.lang.ClassNotFoundException: com/sun/midp/io/j2me/file/Protocol
    any idea???
    Thanks

    A guess would be that you should use file:// and not only file:

  • Subsembly create file with apdu

    I am using subsembly sc api with APDU commands... i have problem with creating file:
    CardCommandAPDU aSelectAPDU = new CardCommandAPDU(0x00, 0xE0, 0x00, 0x00, 3750);
    I read in manual to create file, and it only said that i have to use
    E0, for other arguments it didnt say nothing... so what do i put for
    p1, p2 and cla nad send data?
    I used just size and i got this back:
    SW1:6B
    SW2:00
    It means that p1 or p2 is invalid! So what should i do? help

    Hi boss-tech,
    It appears that this question can better be answered by someone on one of the newsgroups for Windows Mobile or Windows CE. In order to get a quicker and more accurate response, please consider reposting this question to one of the following newsgroups:
    Windows Mobile API:
    microsoft.public.pocketpc.developer
    microsoft.public.smartphone.developer
    Windows CE API:
    microsoft.public.windowsce.embedded
    General programming (not VisualStudio related):
    microsoft.public.windowsce.app.development
    Native compilers:
    microsoft.public.windowsce.embedded.vc
    ActiveSync:
    microsoft.public.pocketpc.activesync
    Best regards,
    Guang-Ming Bian - MSFT
    Please remember to mark the replies as answers if they help and unmark them if they provide no help

  • Hi all, i'm new and facing a problem while creating a new file for Xcode. I can't select the box "with XIB for user interface" if the subclass is "UIViewController".this problem happen after i upgrade Xcode to 4.6 version.Appreciate for any help rendered.

    Hi all, i'm new to Mac book & Xcode. I'm learning and facing problems while creating a new file for Xcode. Before i upgrade the software, i have no issue to create simple steps in apps. After upgrade Xcode to 4.6 version, i'm facing lot's of issue eg.
    1) "the identity "iphone developer" doesn't match any valid certificate/ private key pair",
    2) can't select the box "with XIB for user interface" if the subclass is "UIViewController"..
    Appreciate for any help rendered.

    Mikko777 wrote:So what is the best?
    I wouldn't judge. I've been to Arch for a week, you know? But as said, it's VERY close to it.
    What I dislike after a week is makepkg not handling dependencies automatically (which would be overhead, so probably not appropriate).
    Mikko777 wrote:Also theres KDEmod for modular kde, dunno if its for 64 bits tho.
    Don't actually need that as said ... I see no real benefit of having that other than not beeing a KDE user or having Gentoos useflags.
    Mikko777 wrote:PS:You produce a lot of text and welcome smile
    Yeah. Wonder why I'm still employed? So do I ...

  • Problem opening PC files created on latest version of CS5 on Mac

    Hi.
    We´re a creative team in my company of four people, three mac users and one pc user. We recently all subscribed to the creative cloud so that we allways have the latest version of CS5, but there seems to be a problem with all files edited or created from the PC user.
    We've (mac users, all three) tried to open the files either created or edited by the PC user and we're told that this was created by a newer version and is not possible. Trying to understand why this message occure when all three macs where updated with creative cloud after the PC user.

    your title is confusing.
    the pc user is using cc 2014 apps, correct?
    the mac users are using cc 2014 apps, correct?
    if so, there should be no problem.
    if someone is using cs5 to try and open a file created by a cc 2014 app, you will see the problem you described.

  • Problem in creating text file from report file

    Hello Everybody...
    I have problem in creating text file.
    I had set System Parameter as below
    DESTYPE : File
    MODE : Character
    DESNAME : gayu.txt
    And ruler setting
    Units : Character Cells
    Character Cell Size : Horiziontal = 7
    Vertiacle =12
    GridSpacing : 1
    no of snap points per grid spacing : 1
    but when i run report it will give error
    "REP_1219 M_2 or R_2 has no size -- length or width zero"
    so is there any solution of that
    or another way to convert report into text file?....

    Hi Folks,
    Please don't go after that Error as its a very deceptive one. Please don't go for altering your design Or changing the size of items in your layout.
    Similar errors I have come across in reports. I think its due to file transfer type. You might have transferred the file in Binary and your File Mode I am seeing it as CHAR.
    This normally happens while making the Report Format as "Text". Either you change that format which I think is possible in your case as your basic requirement is making a report output of CHAR type.
    Please check for this error in Metalink and proceed accordingly. I could fix similar errors when I changed Format type to PDF(from text).
    Regards
    Shibu

  • Problem in creating csv file

    I have one problem in creating csv file.
    If one column has single line value, it is coming in single cell. But if the column has no.of lines using carriage return while entering into the table,
    I am not able to create csv file properly. That one column value takes more than one cell in csv.
    For example the column "Issue" has following value:
    "Dear
    I hereby updated the Human Resources: New User Registration Form Request.
    And sending the request for your action.
    Regards
    Karthik".
    If i try to create the csv file that particular record is coming as follows:
    0608001,AEGIS USERID,SINGAPORE,Dear
    I hereby updated the Human Resources: New User Registration Form Request.
    And sending the request for your action.
    Regards
    Karthik,closed.
    If we try to load the data in table it is giving error since that one record is coming in more than one line. How can I store that value in a single line in csv file.
    Pls help.

    I have tried using chr(10) and chr(13) like this......still it is not solved.
    select REQNO ,
    '"'||replace(SUBJECT,chr(13),' ')||'"' subject,
    AREA ,
    REQUESTOR ,
    DEPT ,
    COUNTRY ,
    ASSIGN_TO ,
    to_Date(START_DT) ,
    START_TIME ,
    PRIORITY ,
    '"'||replace(issues, chr(13), ' ')||'"' issues,
    '"'||replace(SOLUTIONS,chr(13),' ')||'"' SOLUTIONS ,
    '"'||replace(REMARKS,chr(13),' ')||'"' REMARKS ,
    to_date(CLOSED_DT) ,
    CLOSED_TIME ,
    MAN_DAYS ,
    MAN_HRS ,
    CLOSED_BY ,
    STATUS from asg_log_mstr
    Pls help.

  • Problems opening .pdf files created in Windows in MAC

    My clients that are using Macs are having problems opening password protected PDFs that I created in Windows. Any suggestions?

    Are your clients using Adobe Reader on Mac, or the built-in Mac OS Preview?  Preview does NOT support the full PDF standard :(.
    From: Adobe Forums <[email protected]<mailto:[email protected]>>
    Reply-To: "[email protected]<mailto:[email protected]>" <[email protected]<mailto:[email protected]>>
    Date: Mon, 26 Sep 2011 15:04:18 -0700
    To: Leonard Rosenthol <[email protected]<mailto:[email protected]>>
    Subject: Problems opening .pdf files created in Windows in MAC
    Problems opening .pdf files created in Windows in MAC
    created by Hollcy<http://forums.adobe.com/people/Hollcy> in PDF Language and Specifications - View the full discussion<http://forums.adobe.com/message/3939175#3939175

  • Mac to Mac file sharing - file permissions problem upon newly created files

    Hi all,
    At home I have two iMac's both running Snow Leopard.
    iMac A/Users/*1 is sharing his iMac A/Users/*1/Documents folder.
    The sharing & permissions - preferences of this folder and the files inside this folder are:
    '*1' : (the iMac A's main user account) : Read & Write
    'share' : (a Sharing Only account, set up from iMac A) : Read & Write
    everyone : : No Access
    iMac B/Users/*2 is able to read & write to this folder because he is connected with iMac A as 'share'.
    So far so good. iMac A/Users/*1 can read & write to his own Documents folder
    and so can iMac B/Users/*2 because he is connected to iMac A as 'share'.
    But: this only applies to the folders and files that are _already in_ the iMac A/Users/*1/Documents folder,
    because I once changed the sharing & permissions -permissions of iMac A/Users/*1/Documents as mentioned above and executed 'Apply to enclosed Items...'.
    So the problem is: when I create a new file or folder on iMac A/Users/*1 or on
    iMac B/Users/*2 and put it in iMac A/Users/*1/Documents, this new file or folder will only
    have the standard sharing & permissions - preferences of any newly created file or folder
    on the iMac X/Users/*Y it was created. The problem is those sharing & permissions - preferences
    will not let the other iMac X"/Users/*Y" Read & Write to this new file or folder but only let himself
    Read & Write. Following, the other iMac X"/Users/*Y" will only be able to Read the newly created
    file or folder, because the standard standard sharing & permissions - preferences on
    iMac A/Users/*1 as well as on iMac B/Users/*2 are the following:
    '*Y' : (the iMac X's main user account) : Read & Write
    staff : (Administrator accounts on iMac X) : Read only
    everyone : : Read only
    A pretty manual fix to this problem is walking to iMacX" and changing the
    sharing & permissions - preferences of the newly created file or folder so that iMacX"
    will also be able to Read & Write this newly created file or folder.
    Does anyone know a better fix for my problem? Basicly I want to have Read & Write
    sharing & permissions on the newly created file or folder for both iMac's,
    not only the for the file or folder creator's iMac. And this without having to change
    sharing & permissions - preferences of this newly created file or folder manually
    each time.
    Thanks in advance,
    Vincent Verheyen.

    Hi all,
    I have found a thread wich i think also handles about my problem.
    The standard sharing & permissions - preferences or privileges
    can be changed apparently, this seems to have got something to do
    with umask and changing this umask. The adress is the following:
    *http://www.macosxhints.com/article.php?story=20031211073631814*
    Other ways to change the above-mentioned umask may be
    applications like SharePoints, TinkerTool or BatChMod.
    All of them are also mentioned in the above-mentioned thread.
    I haven't executed the solution as mentioned in the above-mentioned
    thread yet, replies to the thread speak about insecurity and failures.
    Further more I haven't found any other solutions to my problem,
    so any help is still greatly appreciated.
    Thanks in advance,
    Vincent Verheyen.

  • Newly-created Files & Folders Permission Problem

    Hello. I have a Snow Leopard Server 10.6.8 with Snow Leopard and Lion clients.
    When all Macs were running Snow Leopard, any client could create new folders and files on the Snow Leopard Server, and all other Mac clients can access and modify them (Read and Write permission).
    I updated a few clients to Lion, and now when a Lion client created a new file or folder on the Snow Leopard Server, only that client has Read & Write permission. All other client now cannot modify the newly-created file/folder.
    My temporary fix is to change the folder or file permission on the server so everyone can have access.
    Does anyone know how to fix this? Is this the Lion client problem or the Snow Leopard Server problem?
    Thanks.
    Alex.

    Hello. I have a Snow Leopard Server 10.6.8 with Snow Leopard and Lion clients.
    When all Macs were running Snow Leopard, any client could create new folders and files on the Snow Leopard Server, and all other Mac clients can access and modify them (Read and Write permission).
    I updated a few clients to Lion, and now when a Lion client created a new file or folder on the Snow Leopard Server, only that client has Read & Write permission. All other client now cannot modify the newly-created file/folder.
    My temporary fix is to change the folder or file permission on the server so everyone can have access.
    Does anyone know how to fix this? Is this the Lion client problem or the Snow Leopard Server problem?
    Thanks.
    Alex.

  • How can I create files in unicode format without "byte order mark"?

    Hello together,
    I have to export files in UTF-8 format and have to send them to another partner system which works with linux as operating system.
    I have tried the different possibities to create files with ABAP. But nothing works 100% how I want.
    Some examples:
    1.)
    OPEN DATASET [filename] FOR OUTPUT IN TEXT MODE ENCODING UTF-8.
    If I create a file in this way and download it from application server to local system the result for file format in a unicode text edior like NotePad is "ANSI AS UTF-8". This means I have no BYTE ORDER MARK inside.
    But it is also possible that the file format is only ANSI if the file contains no "special characters", isn't it?
    In my test cases I create 3 files. 2 of them has format "ANSI AS UTF-8", and one only "ANSII".
    After transfer to Linux I get as result 2 times UTF8 and one time ASCII as file format.
    2.)
    OPEN DATASET [filename] FOR OUTPUT IN TEXT MODE ENCODING UTF-8 WITH BYTE ORDER MARK.
    With this syntax the result in local editor looks like ok. I get as format really "UTF-8".
    But I get problems with the system which receives the files.
    All files has the file format UTF-8 on Linux but the interface / script can not read the file with BYTE ORDER MARK.
    This is a very big problem for me.
    Do anybody of you know if it possible to force creation in UTF-8 without a BYTE ORDER MARK?
    This means more or less the first example but all files should have UTF-8 format!
    Thanks in advance
    Christian

    This means it is not possible to create a pure unicode file without the byte order mark?
    You wouldn't happen to know how a file with byte order mark should read on a Linux system?
    Or if this possible or not?
    Regards
    Christian

  • Problems with compressing  files with right hand click. it does not work.

    Problems with compressing files with right hand click.
    I am using the compress function in the Mac OS (File > Compress XX) from time to time. Today it does not work anymore. OS 10.5.6
    I get a message: The content list cannot be created for compressing.
    I tried it with files and folders and keep getting this message. Anybody any idea as to how to fix this

    Thanks I love my macbook!!!!
    I also got further problems such as copy-paste not working etc.
    so I fixed it just this morning by running Applejack 1.5 and am back up running noticing your post.
    thanks for helping though!

Maybe you are looking for

  • Error while starting Oracle Secure Backup Service on Windows

    Hi, I've installed an Oracle 10gR2 database, and an OSB on a Windows XP (SP2) machine, and when trying to start the service (Oracle Secure Backup Services) I got the following error : "Unknown():Unable to load dynamic library'./php_osb.dll'-The opera

  • Accounting Project - Badi DPR_EVENTS

    Hi Gurus, when the project is posted in 'RELEASE' status i have to associate to the project, in accounting dynpro, an internal order just created. I found Badi DPR_EVENTS use with filter ON_PPO_RELEASED but i don't understand how can be use. There's

  • How do I create a Podcast?

    I know you need a microphone, but what else do you need to do?

  • Why is my computer not recognizing my phone as a device?

    My computer is not recognizing that my phone is plugged in... It will charge it, but it won't download my pictures or show that it is even connected on my devices. I have updated all my itunes stuff and restarted my computed. What do I do?

  • Callmanager Hardware mismatch error

    Dear All  We have Cisco Call manager version 7.1, with one publisher and 2 subscribers, we get this error from the reporting of publisher "Gathers data from the Unified CM database to provide a summary of all versions of component installed on each s