Writing a Save command

I am currently working on a project to write my own word processor for practice and fun and I was wondering how one would go about writing a Save command for saving a file to a drive.

Hi,
here is a example to write a file to disk:
he filename is in a textfield
import java.io.*;
import java.awt.*;
void saveFile()
if (tf_new_file.getText().length()==0)
{Toolkit.getDefaultToolkit().beep();   lbl_status.setText("no Filename defined !!" ); return;}
try
BufferedWriter buw = new BufferedWriter(new FileWriter(new File(tf_new_file.getText())));
buw.write(" some txt\n");
buw.flush();
buw.close();
catch(IOException ioe)// Errorhandling
System.out.println(ioe.getMessage());
return;

Similar Messages

  • "Could not complete the save command because of program error."

    Dear all,
    I am having problems saving jpegs on Photoshop CS3. I use windows XP professional. I am saving using the save menu (not save as). I am using a saving archive, where folders are within folders. I am trying to save images which have been copy and pasted from the web.
    The message I get is:
    “Could not complete the save command because of program error.”
    Has anyone got this message, and know how to solve it?
    Helen

    I think My Documents is a local folder.
    I would avoid saving to deeply buried folders because the path will be too long.
    If the problem still persists, try resetting your preferences as described in the FAQ.
    http://forums.adobe.com/thread/375776?tstart=0
    You either have to physically delete (or rename) the preference files or, if using the Alt, Ctrl, and Shift method, be sure that you get a confirmation dialog.
    This resets all settings in Photoshop to factory defaults.
    A complete uninstall/re-install will not affect the preferences and a corrupt file there may be causing the problem.

  • Could not complete the save command because there is not enough memory (RAM)

    Hi There,
    As per subject line we are using Photoshop CC on 3 different computers, got one error frequently on all systems "could not complete the save command because there is not enough memory (RAM)".
    System Configuration:
    2 Systems have Dual Core processor with 4 GB RAM
    & 1 System have Core i3 processor with 8 GB RAM
    We tried to solve our end but still not resolve.
    Regards,
    Pankaj A. Pagare
    Cont. No. 9922507601

    http://forums.adobe.com/community/photoshop
    This forum is actually about the Cloud as delivery, not about using individual programs
    If you start at the Forums Index http://forums.adobe.com/index.jspa
    You will be able to select a forum for the specific Adobe product(s) you use
    Click the "down arrow" symbol on the right (where it says ALL FORUMS) to open the drop down list and scroll

  • Error message"Could not complete the Save command......

    Sometimes when I open Photoshop CS6 (cloud version) and I try to save my work I wil get an error message: "Could not complete the save command because the document is currently being saved in the background. Please try the operation again after the Save Command has finished" Well the background save never finishes and I end up having to restart Photoshop and lose all my work. Any ideas. I am running Windows 7, core i& quad procewssor and 12 gigs of ram.
    Thx

    Hi Chris!
    Yes. I did that after the first time it happened and then it happened again.  Here is my system info:
    Adobe Photoshop Version: 13.0.1 (13.0.1 20120808.r.519 2012/08/08:21:00:00) x64
    Operating System: Windows 7 64-bit
    Version: 6.1 Service Pack 1
    System architecture: Intel CPU Family:6, Model:10, Stepping:5 with MMX, SSE Integer, SSE FP, SSE2, SSE3, SSE4.1, SSE4.2, HyperThreading
    Physical processor count: 4
    Logical processor count: 8
    Processor speed: 3073 MHz
    Built-in memory: 12279 MB
    Free memory: 6264 MB
    Memory available to Photoshop: 10996 MB
    Memory used by Photoshop: 60 %
    Image tile size: 128K
    Image cache levels: 4
    OpenGL Drawing: Enabled.
    OpenGL Drawing Mode: Advanced
    OpenGL Allow Normal Mode: True.
    OpenGL Allow Advanced Mode: True.
    OpenGL Allow Old GPUs: Not Detected.
    Video Card Vendor: ATI Technologies Inc.
    Video Card Renderer: AMD Radeon HD 6800 Series
    Display: 1

  • Save command has suddenly stopped working

    A few days ago, I was unable to use the save command when
    accessing a folder for a website that resides on a network drive.
    Dreamweaver only works now if the local folder is on the same
    computer as the program. Could a MS update or something similar
    have changed the operation or my settings? Or do I need to move
    this local folder onto the computer as the only way to solve this
    sudden problem. This folder has been used regularly for about 6
    months from the network hard drive with no problems.

    This has everything to do with the foldre permission, right
    clik on the
    share folder go to properties click on the security tab and
    see if your user
    name has the write permission, you shoudn't have it anymore.
    Talk to your
    network administrator to correct the prpblem
    aka Frenchy ASP
    "Ginza54321" <[email protected]> wrote in
    message
    news:gffcav$ag2$[email protected]..
    >A few days ago, I was unable to use the save command when
    accessing a
    >folder
    > for a website that resides on a network drive.
    Dreamweaver only works now
    > if
    > the local folder is on the same computer as the program.
    Could a MS
    > update or
    > something similar have changed the operation or my
    settings? Or do I need
    > to
    > move this local folder onto the computer as the only way
    to solve this
    > sudden
    > problem. This folder has been used regularly for about 6
    months from the
    > network hard drive with no problems.
    >

  • Linux server(how to save command out put to another file. )

    hi all,
    i have Q ?
    how to save command out put to another file.
    Ex: #ps -ef
    that particular cmd output i need to save another file.
    is it possible ...if possible ..please let me know
    And how to save command history in Linux.

    df -h >> /oracle/output.log
    /oracle -- mount point name
    Regards
    Asif Kabir

  • Increment and Save command

    The "Increment and Save" command in After Effects serves the fundamental need in professional creative work of preserving the various development stages of a job. Cinema 4D and other pro software packages also have this. Illustrator should too.

    Autosaviour Pro auto saves your Adobe Illustrator artwork
    and they have incremental backups.

  • Safari hanging on save command

    I am a long time MAC user but not a techie.
    I have a problem with Safari producing the beach ball on a save command with several open tabs and windows, There is no warning. I prowl the net for articles then later read an save or send or erase. I have 8Gbs for this reason. I have tried all other browsers but except for this daily problem, Safari is the best for me. Quitting Safari after getting the "not responding" sign does not help. I have to restart the system and it will work for a while.
    Is there anything I can do? I have the lengthy error report if I don't get a crash while saving.
    Thank you.
    Model Name: iMac
    Model Identifier: iMac10,1
    Processor Name: Intel Core 2 Duo
    Processor Speed: 3.06 GHz
    Number Of Processors: 1
    Total Number Of Cores: 2
    L2 Cache: 3 MB
    Memory: 8 GB
    Bus Speed: 1.07 GHz
    Boot ROM Version: IM101.00CC.B00
    SMC Version (system): 1.52f9
    Serial Number (system): W8943CG9B9U
    Hardware UUID: 6F9BDD6E-EB4D-5E9C-BE09-7BA36D54E18C

    HI and welcome to Apple Discussions...
    If you updated to Safari 5 and this started happening after the update, it's possible you have third party Safari add-ons that aren't compatible with Safari 5.
    Go here for trouble shooting 3rd party plugins or input managers which might be causing the problem. Safari: Add-ons may cause Safari to unexpectedly quit or have performance issues
    If third party plugins aren't the issue, go to ~/Library/Caches/com.apple.Safari and move the "cache.db" file to the Trash. Relaunch Safari and try File/Save. If that didn't help, try troubleshooting the Safari .plist file.
    Go to the Safari Menu Bar, click Safari/Preferences. Make note of all the preferences under each tab. Quit Safari. Now go to ~/Library/Preferences and move this file com.apple.safari.plist to the Desktop.
    Relaunch Safari and see if that makes a difference. If not, move the .plist file back to the Preferences folder. If Safari functions as it should, move that .plist file to the Trash.
    And repair disk permissions...
    Launch Disk Utility. (Applications/Utilities) Select MacintoshHD in the panel on the left, select the FirstAid tab. Click: Repair Disk Permissions. When it's finished from the Menu Bar, Quit Disk Utility and restart your Mac. If you see a long list of "messages" in the permissions window, it's ok. That can be ignored. As long as you see, "Permissions Repair Complete" when it's finished... you're done. Quit Disk Utility and restart your Mac.
    Carolyn

  • Save command (not SaveAs)

    Is it possible to save currently active PDF using Save command (not SaveAs)

    Sorry.
    I use Adobe Acrobat 8 Professional.
    Thanks.

  • Save command

    Please help me how do i code the save command using html into database called sybase 9?

    You cannot do that with HTML.
    I'm assuming you are asking how you save entered data into a Sybase database - is that correct?  If so, HTML has no facility for doing that kind of thing.  You would have to use a server scripted solution (i.e., code that runs on the webserver, not code that is rendered in the local browser).  Do you have any skill with server scripting?

  • Save command currently not available

    Hi
    I have created a Photoshop plugin and it was working fine..Now suddenly I am facing an issue..On execution, I am getting an error "Save Command is currently not available". I have not changed anything in code. I am not able to trace the reason.
    Earlier I thought that it is space issue and I vacated memory in my system. But no luck.
    Please guide.
    Thanks

    Something has changed in my functions for doing batch actions in Bridge.  In CS5 Bridge I try to do a simple batch action of saving a DNG file as a jpg and closing the file.  When I attempt this I get a message saying 'The command "Save" is currently not available.
    Batch using tools menu from Bridge to reach Photoshop should work as expected in both CS4 and CS5. If not then there is something wrong on either your system or install.
    Go to Bridge CS5 preference and look for the section Start Up Scripts and see if there is still a Start Up Script for Photoshop CS5 present and with a checkmark in front for activation. If not try first to restart bridge holding down option key and choose refresh preferences. This should retrieve the original Start Up scripts again.
    If your command save as is not available check the action and see what the save path for that acton is. If it is a copied action from an other system changes are that it still contains the save path for the old drive and if the script can't find it it provides a warning message.
    Also check if the drive you save to has both read and write permission.

  • Including Save command in Action

    I'm trying to create an action in Illustrator CS4. The action includes a Save command as the last step in the action.
    I want each Illustrator file I run the action on to save to its current folder location (folder 1, folder 2, folder 3, or whatever). However, when I create the action, Illustrator adds a Save As command (rather than a Save command) that saves to a specific location -- the location the file is in that was open at the time the Action was created.
    Is there a way to record an action with a Save command that defaults to saving the Illustrator file to whichever folder it is currently in?

    Hai friends,
         Is it possible to load "Action" through code or script.
         In photshop we can load the action dynamically.
    Thanks in advance,
    Abu

  • Address book save command

    the save command is never activated, only grayed out, I always have to export the all group. what is the save command for then. can you rename the all group.

    I run this nightly, but you could run it more often. In OS X 10.3 iCal also regularly lost its data, so it makes local copies of both - you could easily remove the iCal part (it seems a lot more stable in 10.4).
    Read the script before using!
    AK
    <pre style="font-family: 'Monaco', 'Courier New', Courier, monospace; overflow:auto; color: #222; background: #DDD; padding: 0.2em; font-size: 10px; width:400px">(* Backup locally the data files used by Address Book and iCal *)
    (* copies are stored in ~/Library/CalBackup (created by the script) *)
    (* Maintains MaxBackUps copies, most recent in folder "1", oldest in "MaxBackUps" *)
    (* Save this as script CalBack in ~/Library/Scripts *)
    (* Run it with cron, or as a repeating alarmed item in iCal (not recommended) *)
    (* To set up for cron, start Terminal and give the command crontab -e *)
    (* Type i to put the editor into insert mode *)
    (* Type 1 1 * * * /users/xxxxxx/Library/Scripts/CalBack *)
    (* but putting your login name instead of xxxxxx *)
    (* then press the escape key to exit insert mode *)
    (* Type to save the file and exit the editor, then quit the Terminal *)
    (* The 1 1 * * * tells the timer to run the script at 1 minute past 1 am every day. If *)
    (* you want it run at 27 minutes past 9 pm then change it to 27 21 * * * *)
    (* AK March 2005 *)
    set MaxBackups to 5 --change to suit your requirements
    --pick up directory path
    set WhoAmI to ((path to home folder) as string) & "Library"
    set iCalPlace to WhoAmI & ":Application Support:iCal"
    set ABPlace to WhoAmI & ":Application Support:AddressBook"
    tell application "Finder"
    --make our backup folder if necessary
    if not (exists folder (WhoAmI & ":CalBackup")) then
    make new folder with properties {name:"CalBackup"} at folder WhoAmI
    end if
    --Loose folder at limit
    if exists folder (WhoAmI & ":CalBackup:" & (MaxBackups as string)) then
    delete folder (WhoAmI & ":CalBackup:" & (MaxBackups as string))
    end if
    --Roll on backup folders
    set TheCount to count of folder (WhoAmI & ":CalBackup:")
    repeat with TheCount from TheCount to 1 by -1
    set name of folder (WhoAmI & ":CalBackup:" & TheCount as string) to (TheCount + 1) as string
    end repeat
    --make new backup folder 1
    make new folder with properties {name:"1"} at folder (WhoAmI & ":CalBackup")
    duplicate every item of folder (iCalPlace) to folder (WhoAmI & ":CalBackup:1")
    duplicate every item of folder (ABPlace) to folder (WhoAmI & ":CalBackup:1")
    end tell
    </pre>

  • AppleScript "save" command with Safari?

    I have used the Script Editor to create complex URLs and open them in Safari. All works smoothly. What does not work smoothly is saving the opened web pages to my desktop so that I can read them when I'm travelling and away from the internet. Is "save" enabled in the Safari dictionary? I have used various commands such as
    tell application "Safari"
    open location theURL
    save
    end tell
    or
    tell application "Safari"
    open location theURL
    save filename
    end tell
    or
    tell application "Safari"
    open location theURL
    save document to filename
    end tell
    where "theURL" is a well-formed URL, and "filename" is either a plain file name or a POSIX or Mac-style path-name including the file name. The URL always opens correctly, but non of these Save commands succeeds in saving the file to disk. "Save" seems to be a basic command in the Standard Suite, but I can't understand how to get it to work with Safari. What am I doing wrong?
    G5 Mac OS X (10.4.3)

    maybe something like this...
    tell application "Safari"
    activate
    tell application "URL Access Scripting"
    download "http://www.apple.com/" to (path to desktop as text) & "apple.html"
    end tell
    end tell
      Mac OS X (10.4.3)  

  • Photoshop CS5.1 "Could not complete the save command because there is not enough memory (RAM) - HELP

    Hi, I use Windows 7, Photoshop CS5.1 often pops up with "Could not complete [command] because there is not enough memory (RAM)."  I have increased my performance preferences to (1451mb) 90%, however I have not restarted Photoshop as I want to try and save the work I have been doing today.  I would greatly appreciate any experience in this area and advice as how to work around this problem.

    Good day!
    You could try to free up resources by closing all non-essential documents and invoking Edit > Purge > All.
    For future use you may want to check out
    http://helpx.adobe.com/photoshop/kb/optimize-performance-photoshop-cs4-cs5.html
    Regards,
    Pfaffenbichler

Maybe you are looking for

  • How do you set up for another ipod on same computer

    I just bought another ipod for my wife and she wants to set up her own itunes account or a completely different library. Can this be done on the same computer or do we have to share the same music?

  • Calling a PL/SQL function in the SQL statement

    I have a PL/SQL function which i should call in a SQL statement. Let's say the function is func1(parameter1,parameter2), it should be called like this :- SELECT func1() FROM mytable ; Can any one help me out on this ? ---Thanx in advance

  • Best practice for tracking database changes...?

    Dear Oracle gurus, I'm still relatively new to database administrating, and recently I ran into a situation which I'm not sure if there's some text-book scenario analysis or practice. I find it hard to track all the database changes across different

  • COPY DOCUMENT ATTACHED IN INQUIRY TO QUOTATION CREATED WITH REFERENCE.

    Hi, I have created a quotation with reference to an inquiry.  I have attached a pdf to this inquiry and I need to know if it is possible to copy this file and attach it to the new quotation. Thanks in advance. Luis Álvarez.

  • Slideshow Captions

    I have over 2000 photos I need to build into multiple slide shows.  Each photo has its own unique caption which I have to type in photo by photo, one at a time. How do I enter the captions for each photo when the thumbnails are covering up the lightb