How to create a file folder

hi,
The following codes throw an exception. The problem is that I can not create a folder "mytemp" under drive C. (Windows 2000)
However, I have already given full permission to jre in the policy file.
Can someone please tell me why? Thanks a lot.
File outputFile = new File("c:\\mytemp\\my.txt");
FileWriter out = new FileWriter(outputFile);
out.write("555");
out.close();

Try
this instead...
regards,
Owen
File outputDir = new File ( "c:\\mytemp" );
if ( !outputDir.exists() )
       outputDir.mkdir();
File outputFile = new File("c:\\mytemp\\my.txt");
FileWriter out = new FileWriter(outputFile);
out.write("555");
out.close();

Similar Messages

  • How to create a file folder in iCloud pages? (a few documents)

    Hey everyone! I want to create some file folders in my Pages on iCloud because there is no clear overview with 20 documents and/or more..but unfortunately it does not work. thanks for your support! best regards, lisa

    I had this question too.  Apple supports folders in a nice way, but it is not advertised or documented, as far as I can tell.
    I figured out how to create folders that I can see on my iPad or my iPhone--through the back door by going into the Library/Mobile Documents folder on my iMac, before I learnedf an easier way to do it on my mobile devices.
    Using your mobile device, if you open up Pages, Numbers, or Keynote on your iPhone or iPad, you have the option to see your Documents.  If you have documents that fall into a category that you would like to put in a common folder, e.g. "Colorado Trip," all you need to do to start the process is select one of the documents by pressing down on it with your finger, then dragging that document on top of one of the other documents that you want in the same folder.  A folder will be created and you will be given a chance to name that folder.  After this step, you can drag other documents into the new folder, or out of it if you change your mind.
    If you have the most recent Pages, Numbers, and Keynote iOS app updates, you can search your directory on your iPhone of iPad.  The search looks inside these new folders, so it's a fairly nice boost to your organization and productivity. 
    Enjoy!

  • I am working in windows 7 and I am trying to enable the copy/paste and I can not find user.j file in the profile and I am not real sure how to create a file, I can create a folder .

    I am trying to copy text from a word document and paste it into my web builder and it says that firefox does not support copy/paste from clipboard. Went to your site and it tells me to open the user.j file in my profile. This file does not exist and I am not real sure how to create that file so I can paste the fix from your site into it.

    I went to that link and added to firefox add on but it still does not work. I went to the add on option button for this but it told me that my MYSIWG widget was disabled. Does this have something to do with it not working and if so how do you enable it.

  • How to create a document folder using ListData.svc

    Hi All,
    I've recently been put on a project where I need to use the REST services (ListData.svc) to retrieve and add documents to the document library. It all has been smooth sailing until I hit the point where I want to save a document in a path that doesn't exist.
    I get an error if I try to save a file where the folder structure doesn't exist. I then went about it a different way trying to create the folder structure first. This also didn't work and I get an error message saying that the entity type is marked with the
    MediaEntry attribute but no save stream was set for the entity. Not too sure what set for the save stream if I'm just adding a folder.
    So my question is can a file be added to a folder structure that doesn't exist where it automatically creates the folders. If not can the service create folders?
    Some sample code I've been using:
    var folder = new SampleDocumentLibraryItem();
    folder.Name = "Sample";
    folder.Title = "Sample";
    folder.ContentType = "Folder";
    folder.Path = "/sample/folder1/folder2";
    spContext.AddToSampleDocumentLibrary(folder);
    spContext.SaveChanges();
    Thanks in advance,
    Damo

    Hi All,
    Finally managed to figure this one out. For anyone who needs source on how to create a document folder. Some sample source is below...
    var folder = new DocumentLibraryItem();
    folder.Name = "Folder Name";
    folder.Title = "Folder Name";
    folder.ContentType = "Folder";
    folder.Path = path;
    spContext.AddtoDocumentLibrary(folder);
    spContext.SetSaveStream(folder, stream, false, folder.ContentType, folder.Path + folder.Name + "|0x0120009BCC19899CEBC6468FF4EEAC7B8CF4F5"
    spContext.SaveChanges();
    So the important differences in the code above. The content type of the object and stream MUST be set to "Folder". I'm not sure why but you still need to set the save stream to be a valid stream even though you're only adding a folder. So just keep the stream
    open and then pass "true" to close it when you actually save the file. The other important element as noted from the URL's in the previous comments is you need to add a "|" + Content Type ID of a folder. You'll be able to get this ID by visiting the rest service
    for an existing document library and view source to see the actual content type id for a folder.
    Thanks everyone for your help,
    Damo

  • How to create backup file on itunes for ipod touch 4g game apps data? Is there a way to do it? I want to try an app on my friend's computer, but you can't add apps on another computer without having your own ipod's data being deleted. Thx for any help!

    How to create backup file on itunes for ipod touch 4g game apps data? Is there a way to do it? I want to try an app on my friend's computer, but you can't add apps on another computer without having your own ipod's data being deleted. Thx for any help!
    I want to know how to create a backup file (because I'm pretty new with itunes, and it's hard to use it for me still), how to store my app data/media/videos, etc. And how I can retrieve them back when I'm done with the app I tried on my friend's computer.
    If anyone can help, it'd be great! Thank you so much!

    Sure-glad to help you. You will not lose any data by changing synching to MacBook Pro from imac. You have set up Time Machine, right? that's how you'd do your backup, so I was told, and how I do my backup on my mac.  You should be able to set a password for it. Save it.  Your stuff should be saved there. So if you want to make your MacBook Pro your primary computer,  I suppose,  back up your stuff with Time machine, turn off Time machine on the iMac, turn it on on the new MacBook Pro, select the hard drive in your Time Capsule, enter your password, and do a backup from there. It might work, and it might take a while, but it should go. As for clogging the hard drive, I can't say. Depends how much stuff you have, and the hard drive's capacity.  As for moving syncing from your iMac to your macbook pro, should be the same. Your phone uses iTunes to sync and so that data should be in the cloud. You can move your iTunes Library to your new Macbook pro
    you should be able to sync your phone on your new MacBook Pro. Don't know if you can move the older backups yet-maybe try someone else, anyways,
    This handy article from Apple explains how
    How to move your iTunes library to a new computer - Apple Support''
    don't forget to de-authorize your iMac if you don't want to play purchased stuff there
    and re-authorize your new macBook Pro
    time machine is an application, and should be found in the Applications folder. it is built in to OS X, so there is nothing else to buy. double click on it, get it going, choose the Hard drive in your Time capsule/Airport as your backup Time Machine  and go for it.  You should see a circle with an arrow on the top right hand of your screen (the Desktop), next to the bluetooth icon, and just after the wifi and eject key (looks sorta like a clock face). This will do automatic backups  of your stuff.

  • How to create xpi file for my own extension?

    I have created my own extension and directly added profile extension folder in my system.its working fine. but while installing extension using .xpi file its produce error "Install script not found
    -204".Please explian me how to create .xpi file for my extension folder.
    I hope you can help this issues.
    Thanks in advance.
    Regards
    vasanthi

    See this:
    https://developer.mozilla.org/en/Building_an_Extension

  • How to organize my files folder?

    how to organize my files folder without being on my desktop? I'm used to window, is there a way to create a basic folder and then subdivide it from there, but where is the best place, easy access

    You can create a folder on the desktop if you wish, and then create folders within that folder, and folders within those folders ad infinitum.  However, if you open Finder (it's the leftmost icon on your dock and looks like a blue/white face) then you will see the Documents folder.  That is the logical place to store your files generally.  The same comment I made earlier about nesting folders within folders applies here too.

  • How to create txt file in utf-8?

    Hi,
    if i create a txt file using vb in fdm, it is created with the ansi encoding. Is there any option how to create this file in utf-8?
    Thx

    Forms6i uses Oracle 8.0.6 client libraries. MetaLink Note 207303.1 lists supported client/server configurations, and the last database version supported with those libraries is Oracle 9.2. The only exception is made for e-Business Suite (Oracle Applications). Therefore, you configuration is not supported.
    Anyway, Oracle 8.0.6 does not support AL32UTF8 well. You should select UTF8 as the database character set (not national character set!). You need to select a check box on DBCA interface (possibly unavailable in fast/default installation path) which allows you to see non-recommended character sets.
    -- Sergiusz

  • How to create a new folder in my iPad hotmail?

    How toI create a new folder in my iPad hotmail?

    You can only do it with IMAP email account; to do this:
    1. Go to your email account in the Mail app and look at the window where your Inbox, Trash folder and Sent folder are.
    2. Tap the Edit button
    3. Tap Add Mailbox (bottom)
    Note: If there is no Edit button, your email account is not a IMAP account

  • How to create a new folder in my email box

    how to create a new folder in my email box?

    Organizing Mail
    http://support.apple.com/kb/HT5361

  • How to create xml file from Oracle and sending the same xml file to an url

    How to create xml file from Oracle and sending the same xml file to an url

    SQL/XML (XMLElement, XMLForest, XMLAgg, etc) and UTL_HTTP.
    Whether that works for you with the version of Oracle you have, your requirements, and needs is another story. A little detail goes a long way.

  • How to create a file in the server?

    Hi,
    I'm making a webservice that has to generate a XML file, sign it using another webservice and return this XML. The problem is that i don't know how to create the file in the server throught webservice.
    I use this code in the webservice to generate the XML and after I return the XML to client in a byte[]
         static void outputDocumentToFile(Document myDocument, String path) {
            //setup this like outputDocument
              try {
                   // XMLOutputter outputter = new XMLOutputter("  ", true);
                   XMLOutputter outputter = new XMLOutputter();
                   //output to a file
                   FileWriter writer = new FileWriter(path);
                   outputter.output(myDocument, writer);
                   writer.close();
              } catch(java.io.IOException e) {
                   e.printStackTrace();
        }But the file is generated in the client-side, how can I generate the file in the server-side?
    Thanks very much.

    Well the File object doesn't create a file it's simply an abstract representation of file and directory pathnames.
    You can try something like this:
    <%
    try
    // get the path to the web server root
    // I read somewhere not to use 'getRealPath' for some reason which I
    // can't seem to remember :S Hopefull someone can enlighten us :)
    String path = application.getRealPath("/project/jsp/demo.txt");
    File file = new File(path);
    PrintWriter writer = new PrintWriter(new BufferedWriter(new FileWriter(file)));
    writer.println("Hello World!");
    writer.close();
    catch (Exception e)
    System.err.println(e.getMessage());
    %>
    Hope this helps :)

  • How to create pdf files in UNIX directory from oracle reports

    I would like to know how to create pdf files in UNIX directory from oracle reports.
    Thanks,

    Please make your question more clear . Also mention the reports version.
    1) If you are runnning reports in Unix, you can give
    .... destype=file desformat=pdf desname=<filename>
    in command line
    Please refer docs below.
    2) If by your question you mean
    "My reports server is running in Windows but I want to ftp my files to Unix after creating it"
    then the answer is that you can use pluggable destination "ftp"
    .... destype=ftp desformat=pdf desname=<ftp url>
    Pluggable destinations download
    http://otn.oracle.com/products/reports/pluginxchange/index.html
    Thanks
    Ratheesh
    [    All Docs     ]
    http://otn.oracle.com/documentation/reports.html
    [     Publishing reports to web  - 10G  ]
    http://download.oracle.com/docs/html/B10314_01/toc.htm (html)
    http://download.oracle.com/docs/pdf/B10314_01.pdf (pdf)
    [   Building reports  - 10G ]
    http://download.oracle.com/docs/pdf/B10602_01.pdf (pdf)
    http://download.oracle.com/docs/html/B10602_01/toc.htm (html)
    [   Forms Reports Integration whitepaper  9i ]
    http://otn.oracle.com/products/forms/pdf/frm9isrw9i.pdf

  • How to create temp files in temp tablespace

    Dear all,
    Due to outage of our SAN, we our out of production for the
    last 3 days. By the grace of Almighty we have restored production by
    database recovery from our standby backup. Since temp tablespace and
    temp data files do not taken as backup for standby, now after recovery
    we are getting abap dumps asking for temp_1 and temp_2 datafiles.
    Please guide us how to create temp files. v$tablespace is showing tablespace PSAPTEMP but datafile are not there
    Abap dumps are giving these errors as mentioned below
    ====================================================
    The exception must either be prevented, caught within the procedure            
    "DATA_SELECTION"                                                              
    "(FORM)", or declared in the procedure's RAISING clause.                       
    To prevent the exception, note the following:                                  
    Database error text........: "ORA-01157: cannot identify/lock data file 256 -  
    see DBWR trace file#ORA-01110: data file 256:                                 
    '/oracle/SD1/sapdata4/temp_2/temp.data2'"                                     
    Internal call code.........: "[RSQL/FTCH/MARA ]"                               
    ===================================================
    another one asking for 
    '/oracle/SD1/sapdata3/temp_1/temp.data1'"
    Best Regards
    Waqas

    if you want to add a new tempfile to your TEMP Tablespace,you can do like that.
    <i>ALTER TABLESPACE</i> <<b><u>name of TEMP Tablespace</u></b>> ADD TEMPFILE <<b><u><b><u>pfad to the file_and_file name</u></b></u></b>> <b>SIZE</b> <size>;
    You can use also the options <i>REUS</i>E <i>autoextend off</i> or <i>on</i> .
    e.g:
    <i>alter tablespace</i> <u><b>PSAPTEMP</b></u> add <i>tempfile</i> <b><u>'/oracle/SD1/sapdata4/temp_2/temp.data2'</u></b> <i>SIZE 1000K</i> <i>REUSE</i>;
    The directory <b><u>temp_2</u></b> should exist.
    Or you can use the BR*Tools to create a new datafile. Enter brtools and follow the instructions or menu.
    More to TEMP Tablespaces see please following SAP notes:
    <u><b>659946</b></u> - FAQ: Temporary tablespaces
    <u><b>600513</b></u> - ORA-25153 after recovery due to missing tempfiles
    and the Oracle Note:
    <u><b>160426.1</b></u>: TEMPORARY Tablespaces : Tempfiles or Datafiles ?
    I hope it helps.

  • How to create IDX files

    Hi All,
    How to create IDX files, In pdf i have done full text index with catlog, i have got the pdx files.
    But i need the index files *.idx files.
    How to get these files.
    Please help me to solve this issue.
    Regards,
    Vinoth

    i have created the button on Acrobat X professional.
    Please find the below code for search the text
    // Test search text and only proceed if it’s not empty
    var cSearchTxt = this.getField("SearchText").value;
    if(!/^\s*$/.test(cSearchTxt))
       // Create first part of path to index file from this file
       var aPath = this.path.split("/");
       aPath.pop();
       var cPathRoot = aPath.join("/");
       // Determine Index to use with search
       var cIdxPath = "";
       var cCatagory = this.getField("Catagory").value;
       switch(cCatagory)
          case "P01":
             cIdxPath = cPathRoot + "/Catalogs/Paper01.pdx";
             break;
          case "P02":
             cIdxPath = cPathRoot + "/Catalogs/Paper02.pdx";
             break;
       // Setup Search Options
       //search.matchCase = this.getField("CaseSensitive").isBoxChecked(0);
       //search.matchWholeWord = this.getField("WholeWord").isBoxChecked(0);
       //search.wordMatching = this.getField("MatchOpts").value;
       //  Perform Search
       search.query(cSearchTxt, "Index", cIdxPath);
    Regards,
    Vinoth

Maybe you are looking for

  • HP officejet pro 8600 plus - error 1627 on failed driver installation.

     What is the solution to this problem ? (I have uninstalled old driver, worked my way through the HP troubleshoot 3 times unsuccessfully, and used microsoft fixit  2 times, all to no avail, and great frustration! OS is windows 7 home premium 64bit Th

  • Deleting messages from server shortcut?

    Today I inadvertently stumbled upon a keyboard shortcut which opened a (preference?) box allowing me to view the messages which are on the server, and delete them if desired. This is totally different from the preferences command to delete the messag

  • Entry doesnot exist in the T005q (check entry)

    i configured the country keys and with holding countires also. when ia m entering with holding tax key in does not exist in the too5 q . mean while because of this vendor master data cin details tab is not occured. kindky give how to resolve 2 issues

  • Nls_language Please Help

    how do i set nls_language to utf8 so it would be initialized when db is started? when i try putting it into init<SID?>.ora i get an error that says: ORA-12700: invalid NLS parameter value (nls_language) i try doing this init.ora file: nls_language =

  • My ipod 2nd generation will not work because I forget my passcode

    I am trying to wipe my ipod