JFileChooser: filename changes when i change directories

Hi,
I'm having a problem with a file chooser : when changing directories (change from default directory to dir of my choice), the "Filename:" text gets changed too.
Here is what is actually happening :
- I use setSelectedFile(<default file>) on my file chooser before opening
- it opens with <default file> in the Filename field.
- I switch to a different directory by double clicking within the area which shows the directories and files.
-->> problem : my filename takes the name of the directory which i double clicked.
** surprisingly enough , when i select a directory from the drop down list of the filechooser the above problem doesnt happen .
Below is my code. cud someone tell what is missing/wrong. plz treat this as urgent , i got to ship the code after 4 hrs
Thanks in advance for any help, i will more than glad to offer duke dollars for this one.
KG
public class StepSaveFileDialog extends JFileChooser  {
    String fileExtension = null;
    JFileChooser fileDialog = null;
    String reportName = null;
      public StepSaveFileDialog(String fileExtension,String reportName) {//used to get the fileextension and the reportName
        this.fileExtension = fileExtension;
        this.reportName = reportName.replaceAll(" ","_"); 
      public String getSaveDialog() throws IOException {
        String filePath = null;
        fileDialog = new JFileChooser();
        fileDialog.setDialogType(JFileChooser.SAVE_DIALOG);
        fileDialog.setFileSelectionMode(JFileChooser.FILES_AND_DIRECTORIES);
        fileDialog.setAcceptAllFileFilterUsed(true);
        fileDialog.setFileFilter(new StepFileFilter(this.fileExtension));
        String dfltFilePath = ReportEngine.getDefaultReportSavePath();
        File selFile = null;
        String date = new StepDate(System.currentTimeMillis()).toString();
        date = date.replaceAll("/","");
        reportName = reportName + "_" + date;
        if (dfltFilePath != null) {
            selFile = new File((new File(dfltFilePath)).getCanonicalPath() + "\\" + reportName);
        }else{
            selFile = new File(reportName);
        fileDialog.setCurrentDirectory(selFile);
        fileDialog.setSelectedFile(selFile);
        int option = fileDialog.showSaveDialog(StepMainFrame.getInstance());
        if (option == JFileChooser.APPROVE_OPTION) {
            selFile = fileDialog.getSelectedFile();
                File reportFile = new File(selFile.toString());
                boolean success = reportFile.createNewFile();
                if (!success) {
                    fileDialog.show();
                    fileDialog.setVisible(true);
                    int overwriteOption = JOptionPane.showConfirmDialog(
                            fileDialog, selFile.getAbsolutePath()
                                    + StepStatusMessage.PROMPT_FOR_OVERWRITE);
                    if (overwriteOption == JOptionPane.NO_OPTION) {
                        filePath = getSaveDialog();
                        return filePath;
                filePath = reportFile.getAbsolutePath();
        return filePath;
the ReportEngine.getDefaultReportSavePath() is like this
private String getDefaultReportSavePath() {
        Properties prop = new Properties();
        String dfltFilePath = null;
        try {
            File file = new File(CONFIG_FILE);
            FileInputStream inputStream = new FileInputStream(file);
            prop.load(inputStream);
            inputStream.close();
            dfltFilePath = (String) prop.get("step.reportFilePath");
        } catch (IOException ioe) {
            StepStatusBar.getInstance().writeErrorMessage(ioe.getMessage());
            StepLogger.getLogger().fatal(ioe.getMessage(), ioe);
        return dfltFilePath;
}the fileFilter is like this :
public class StepFileFilter extends javax.swing.filechooser.FileFilter {
    String fileExtension = null;
    public StepFileFilter(String fileExtension) {
        this.fileExtension = fileExtension;
    public boolean accept(File f) {
            return f.isDirectory() || f.getName().toLowerCase().endsWith(this.fileExtension);
    public String getDescription() {
        return this.fileExtension;
}

You will still be able to navigate through the area
where the files and directories are displayed with
FILES_ONLY. Clicking on a file will cause its name to
appear in the File Name field, while double-clicking
on a directory will navigate into it.
FILES_AND_DIRECTORIES causes the names of both files
and directories to appear in the File Name field when
they are clicked.
MikeHey Mike , thanks a lot .... it worked

Similar Messages

  • JFileChooser incredibly slow both to initialize and to change directories

    I have searched the forums for this and haven't found anything useful. I have the following code running in jre1.6.0_07:
    JFileChooser objFileChooser = new JFileChooser();
    objFileChooser.setAcceptAllFileFilterUsed(true);
    objFileChooser.addChoosableFileFilter(new CookbookFileFilter());
    objFileChooser.setMultiSelectionEnabled(false);
    if(objFileChooser.showOpenDialog(this) == JFileChooser.APPROVE_OPTION)
         getModel().load(objFileChooser.getSelectedFile().getAbsolutePath());the first line takes upwards of 20-30 seconds or more to get past when debugging - I don't know how long it takes when running without the debugger however the application does sit for a while after pressing the hotkey to activate the actionlistener. That's a problem, but if that was the only thing, I would do as another post suggested and initialize the jFileChooser from a separate thread during the initialization of the window or application...however, I also run into an issue whenever I change directories where it takes a subset of the initialization time(maybe 10-15 seconds instead of 20-30) to change the directory. This happens in both System and Cross-Platform Look and Feel-s.
    I've looked into the issue with zip files and there are no (0) zip files(or archives of any kind) in the initial directory(My Documents folder). There is a small delay going to My Computer through Windows normally but it may be 1-2 seconds at most, and only sometimes. Notepad opens the Load / Save Dialogs within milliseconds and while I do understand Java is not Notepad, I'm willing to accept a few seconds (like maybe 5 or so), but not 20-30. I also looked into potentially using JDK 7 however I can't seem to get Eclipse to work with it and it consistently uses the JDK 6.
    If a solution can not be found to this, then is there a way to hook into the dialog/control in order to change the mouse cursor to the 'wait' cursor and change it back when the directory is ready? I'd like to provide some communication to the user. Thanks!

    camickr,
    I did include a "Short, Self Contained, Compilable and Executable Example Program (SSCCE)" in my initial posting; and I also included Code Formatting as everyone can see. I've been a programmer for over 10 years, closer to 15 and have almost 8 years experience with Java so I'm not about to ask a question without investigating the solution on my own first(to avoid wasting people's time. Admittedly all I posted was the snippet but that entire snippet could be put within Main like this below and it would be exactly the same without the waste of space. The machine I have running / developing this on is: Athlon 64 3000, 1 GB RAM, about 13 or 14 total hard drive partitions and removable media drives, running under Windows XP SP2. I can even eliminate the Choosable Filter in the example as I do below and the JFileChooser takes (31 seconds on average over 5 iterations, I timed it after I originally posted this) to fully display the dialog and all files and deliver control back to the user. That is unacceptable and one can not deny that it's the class itself when FileDialog runs significantly faster and programs outside of Java executing the standard XP File Dialog run even faster still. If this code is not good enough, I don't know how much shorter or self contained I can make this code example without removing the configuration lines between the initialization and that would defeat my cause as I need the Look and feel customization and prefer not writing my own File Chooser Dialog. Here's the code w/ the main function and all.
    import javax.swing.JFileChooser;
    public class Example
         public static void main(String[] args)
              JFileChooser objFileChooser = new JFileChooser();
              objFileChooser.setAcceptAllFileFilterUsed(true);
              objFileChooser.setMultiSelectionEnabled(false);
              if(objFileChooser.showOpenDialog(null) == JFileChooser.APPROVE_OPTION)
                   System.out.println("Approved");
    }Thanks,
    Seth

  • Need help on changing directories with Runtime.getRuntime().exec() (shell)

    I want to create a perfect remote shell with Runtime.getRuntime(). I just can't get it to change directories. I want that if the remote user type "cd.." he changes the directory. At the moment, I can't get anything else than the "user.dir" directory.
    Is there anyway to send additionnal commands to cmd.exe after the Runtime.getRuntime().exec(). Because at the moment I'm running these commands:
    cmd[0] = "cmd.exe" ;
    cmd[1] = "/C" ;
    cmd[2] = commandString;
    After that I just wanna do stuff as if I really was at the computer and had a cmd.exe window open. I tried the output stream, I tried placing "&&" in front of the commandString(worked when I did it in cmd window), tried doing multiple Runtime.getRuntime().exec(). Starting to pull my hair out here.

    Because essentially I want this to be a remote shell.
    So I need it to accepts commands such as cd to change
    around the directory so the person can navigate the
    computer.
    I just managed to be able to do it in one command
    line. For example I would send "cd c:\downloads dir"
    to the server and it would work but I would really
    like to keep track of the working directory so the
    user wouldn't always have to change the directory.Then you don't Runtime.exec() once for each command the user types. You Runtime.exec() a shell once, and pass what the user types and the shell's responses via the in/out streams available from the Process class.

  • Socket ftp and changing directories.

    I am have trouble changing diretories when using the ftp command CWD when connected to an ftp through a Socket. Sometimes it changes forward and sometimes it doesnt, and it never goes back one directory.
    I use "CWD /webStuff", then I try to go back using "CWD ftp.host.com/rootFolder and it gives an error. Any suggestions on the proper format using CWD to change up and down directories?
    Do i need to type the full path (ex. ftp://ftp.host.com/)? I have no idea how this changing directories work, online they only talk about CD and the ftp I am using doesn't recognize CD. Only CWD. Can't find much about using CWD. Please help.

    well, I tried testing the ftp from the DOS prompt in
    windows XP. I can connect, but CWD is not a command
    in the windows command prompt. Sorry but that doesn't make any sense.
    Either you are or are not running a ftp client. An ftp client would have a console window. That console window is not the same as the windows command prompt.
    So i don' t know how
    I would test it. If you are in fact running a ftp client and the CWD command does not work then it means the ftp server does not support that command. That command is optional in the FTP protocol. In that case you can't 'move' within the directory tree - you have to connect directly to each directory.
    Also, I can connect to the ftp
    using a Socket object. Then I can log in using USER
    and PASS. The problem I have is changing
    directories. CWD is really confusing. I found
    something that using "CWD .." or "CWD ../" might
    work. You can try 'CDUP' as well. (And I have no idea why that is the name but it does go up the tree.)
    I have to try those. But what I'm really
    looking for is the ability to go lets say I log into
    ftp.host.com/Folder. And then I want to change to
    ftp.host.com/Folder/NextFolder/FinalFolder. And
    finally I want to change from that point to
    ftp.host.com/Folder/AnotherFolder/YetAnotherFolder.
    The command 'LIST' should return a list of directories. You would have to parse that list. Keep in mind that the result of this will vary by FTP server version. You can use the parsed list to
    'NLST' returns files names.
    Of course test both of the above to verify that not only that they work but what they actually return.
    windows command prompt you can use "cd \anyfolder"
    and it wil take you there. But am I limited to only
    going "CWD nextFolder" and "CWD ../" or can i jump
    to any Folder on the ftp somehow like I can in
    windows?Again, this depends on the FTP server. Like I said you need to actually test it. And test each version that you need to connect to.

  • Filename change history available

    Does OS X store a list of modifications done to the filename of a specific file ?
    For example I created a file named "myfile.ext" (regardless by which application), then change the original name to "myfile2.ext", "differentname.ext" and so on.
    Is there a way to track such filename changes in something like a history view or stored in an attribute (chmod file modes, ACL, whatever) ?

    Not that I know of.
    Francine
    Francine
    Schwieder

  • JFileChooser not opening when we applied custom Look and Feel & Theme

    Dear All,
    JFileChooser not opening when we applied custom Look and Feel & Theme.
    The following is the source code
    import java.awt.Color;
    import javax.swing.*;
    import javax.swing.plaf.ColorUIResource;
    import javax.swing.plaf.metal.MetalLookAndFeel;
    import com.jgoodies.looks.plastic.*;
    public class CustomTheme {
    public static void main(String[] args)throws UnsupportedLookAndFeelException{
    UIManager.setLookAndFeel(new MyLookAndFeel());
    MyLookAndFeel.setCurrentTheme(new CustomLaF());
    JFrame frame = new JFrame("Metal Theme");
    JFileChooser jf = new JFileChooser();
    System.out.println("UI - > "+jf.getUI());
    //jf.updateUI();
    frame.getContentPane().add(jf);
    frame.pack();
    frame.setVisible(true);
    static class CustomLaF extends PlasticTheme {
    protected ColorUIResource getPrimary1() {
    return new ColorUIResource(232,132,11);
    public ColorUIResource getPrimary2() {
              return (new ColorUIResource(Color.white));
         public ColorUIResource getPrimary3() {
              return (new ColorUIResource(232,132,11));
    public ColorUIResource getPrimaryControl() {
    return new ColorUIResource(Color.GREEN);
    protected ColorUIResource getSecondary1() {
    return new ColorUIResource(Color.CYAN);
    protected ColorUIResource getSecondary2() {
              return (new ColorUIResource(Color.gray));
         protected ColorUIResource getSecondary3() {
              return (new ColorUIResource(235,235,235));
         protected ColorUIResource getBlack() {
              return BLACK;
         protected ColorUIResource getWhite() {
              return WHITE;
    static class MyLookAndFeel extends Plastic3DLookAndFeel {
              protected void initClassDefaults(UIDefaults table) {
                   super.initClassDefaults(table);
              protected void initComponentDefaults(UIDefaults table) {
                   super.initComponentDefaults(table);
                   Object[] defaults = {
                             "MenuItem.foreground",new ColorUIResource(Color.white),
                             "MenuItem.background",new ColorUIResource(Color.gray),
                             "MenuItem.selectionForeground",new ColorUIResource(Color.gray),
                             "MenuItem.selectionBackground",new ColorUIResource(Color.white),
                             "Menu.selectionForeground", new ColorUIResource(Color.white),
                             "Menu.selectionBackground", new ColorUIResource(Color.gray),
                             "MenuBar.background", new ColorUIResource(235,235,235),
                             "Menu.background", new ColorUIResource(235,235,235),
                             "Desktop.background",new ColorUIResource(235,235,235),
                             "Button.select",new ColorUIResource(232,132,11),
                             "Button.focus",new ColorUIResource(232,132,11),
                             "TableHeader.background", new ColorUIResource(232,132,11),
                             "TableHeader.foreground", new ColorUIResource(Color.white),
                             "ScrollBar.background", new ColorUIResource(235,235,235),
                             "ToolTip.foreground", new ColorUIResource(232,132,11),
                             "ToolTip.background", new ColorUIResource(Color.white),
                             "OptionPane.questionDialog.border.background", new ColorUIResource(Color.gray),
                             "OptionPane.errorDialog.titlePane.foreground", new ColorUIResource(Color.white),
                             "OptionPane.questionDialog.titlePane.background", new ColorUIResource(232,132,11),
                             "Table.selectionBackground", new ColorUIResource(232,132,11)
                   table.putDefaults(defaults);
    When i run this program the following error is coming:
    Exception in thread "main" java.lang.NullPointerException
    at javax.swing.plaf.metal.MetalFileChooserUI$IndentIcon.getIconWidth(Unknown Source)
    at javax.swing.SwingUtilities.layoutCompoundLabelImpl(Unknown Source)
    at javax.swing.SwingUtilities.layoutCompoundLabel(Unknown Source)
    at javax.swing.plaf.basic.BasicLabelUI.layoutCL(Unknown Source)
    at javax.swing.plaf.basic.BasicLabelUI.getPreferredSize(Unknown Source)
    at javax.swing.JComponent.getPreferredSize(Unknown Source)
    at javax.swing.plaf.basic.BasicListUI.updateLayoutState(Unknown Source)
    at javax.swing.plaf.basic.BasicListUI.maybeUpdateLayoutState(Unknown Source)
    at javax.swing.plaf.basic.BasicListUI$ListSelectionHandler.valueChanged(Unknown Source)
    at javax.swing.DefaultListSelectionModel.fireValueChanged(Unknown Source)
    at javax.swing.DefaultListSelectionModel.fireValueChanged(Unknown Source)
    at javax.swing.DefaultListSelectionModel.fireValueChanged(Unknown Source)
    at javax.swing.DefaultListSelectionModel.changeSelection(Unknown Source)
    at javax.swing.DefaultListSelectionModel.changeSelection(Unknown Source)
    at javax.swing.DefaultListSelectionModel.setSelectionInterval(Unknown Source)
    at javax.swing.JList.setSelectedIndex(Unknown Source)
    at javax.swing.plaf.basic.BasicComboPopup.setListSelection(Unknown Source)
    at javax.swing.plaf.basic.BasicComboPopup.access$000(Unknown Source)
    at javax.swing.plaf.basic.BasicComboPopup$ItemHandler.itemStateChanged(Unknown Source)
    at javax.swing.JComboBox.fireItemStateChanged(Unknown Source)
    at javax.swing.JComboBox.selectedItemChanged(Unknown Source)
    at javax.swing.JComboBox.contentsChanged(Unknown Source)
    at javax.swing.AbstractListModel.fireContentsChanged(Unknown Source)
    at javax.swing.plaf.metal.MetalFileChooserUI$DirectoryComboBoxModel.setSelectedItem(Unknow
    at javax.swing.plaf.metal.MetalFileChooserUI$DirectoryComboBoxModel.addItem(Unknown Source
    at javax.swing.plaf.metal.MetalFileChooserUI$DirectoryComboBoxModel.access$2300(Unknown So
    at javax.swing.plaf.metal.MetalFileChooserUI.doDirectoryChanged(Unknown Source)
    at javax.swing.plaf.metal.MetalFileChooserUI.access$2600(Unknown Source)
    at javax.swing.plaf.metal.MetalFileChooserUI$12.propertyChange(Unknown Source)
    at javax.swing.event.SwingPropertyChangeSupport.firePropertyChange(Unknown Source)
    at javax.swing.event.SwingPropertyChangeSupport.firePropertyChange(Unknown Source)
    at javax.swing.JComponent.firePropertyChange(Unknown Source)
    at javax.swing.JFileChooser.setCurrentDirectory(Unknown Source)
    at javax.swing.JFileChooser.<init>(Unknown Source)
    at javax.swing.JFileChooser.<init>(Unknown Source)
    at CustomTheme.main(CustomTheme.java:20)
    I am extending the JGoodies Look And Feel & Theme.
    Thanks in advance
    Krishna Mohan.

    Dear cupofjoe,
    Thank you for your response.
    I am using the Latest JGoodies Look & Feel which is downloaded from http://www.jgoodies.com.
    i am writing our own custom Look & Feel By Overridding Jgoodies Look & Feel.
    In that case i am getting that error.
    The following is the source code:
    import java.awt.Color;
    import javax.swing.*;
    import javax.swing.plaf.ColorUIResource;
    import javax.swing.plaf.metal.MetalLookAndFeel;
    import com.jgoodies.looks.plastic.*;
    public class CustomTheme {
    public static void main(String[] args)throws UnsupportedLookAndFeelException{
    UIManager.setLookAndFeel(new MyLookAndFeel());
    MyLookAndFeel.setCurrentTheme(new CustomLaF());
    JFrame frame = new JFrame("Metal Theme");
    JFileChooser jf = new JFileChooser();
    //System.out.println("UI - > "+jf.getUI());
    //jf.updateUI();
    //frame.getContentPane().add(jf);
    frame.pack();
    frame.setVisible(true);
    static class CustomLaF extends PlasticTheme {
    protected ColorUIResource getPrimary1() {
    return new ColorUIResource(232,132,11);
    public ColorUIResource getPrimary2() {
              return (new ColorUIResource(Color.white));
         public ColorUIResource getPrimary3() {
              return (new ColorUIResource(232,132,11));
    public ColorUIResource getPrimaryControl() {
    return new ColorUIResource(Color.GREEN);
    protected ColorUIResource getSecondary1() {
    return new ColorUIResource(Color.CYAN);
    protected ColorUIResource getSecondary2() {
              return (new ColorUIResource(Color.gray));
         protected ColorUIResource getSecondary3() {
              return (new ColorUIResource(235,235,235));
         protected ColorUIResource getBlack() {
              return BLACK;
         protected ColorUIResource getWhite() {
              return WHITE;
    static class MyLookAndFeel extends Plastic3DLookAndFeel {
              protected void initClassDefaults(UIDefaults table) {
                   super.initClassDefaults(table);
              protected void initComponentDefaults(UIDefaults table) {
                   super.initComponentDefaults(table);
                   Object[] defaults = {
                             "MenuItem.foreground",new ColorUIResource(Color.white),
                             "MenuItem.background",new ColorUIResource(Color.gray),
                             "MenuItem.selectionForeground",new ColorUIResource(Color.gray),
                             "MenuItem.selectionBackground",new ColorUIResource(Color.white),
                             "Menu.selectionForeground", new ColorUIResource(Color.white),
                             "Menu.selectionBackground", new ColorUIResource(Color.gray),
                             "MenuBar.background", new ColorUIResource(235,235,235),
                             "Menu.background", new ColorUIResource(235,235,235),
                             "Desktop.background",new ColorUIResource(235,235,235),
                             "Button.select",new ColorUIResource(232,132,11),
                             "Button.focus",new ColorUIResource(232,132,11),
                             "TableHeader.background", new ColorUIResource(232,132,11),
                             "TableHeader.foreground", new ColorUIResource(Color.white),
                             "ScrollBar.background", new ColorUIResource(235,235,235),
                             "ToolTip.foreground", new ColorUIResource(232,132,11),
                             "ToolTip.background", new ColorUIResource(Color.white),
                             "OptionPane.questionDialog.border.background", new ColorUIResource(Color.gray),
                             "OptionPane.errorDialog.titlePane.foreground", new ColorUIResource(Color.white),
                             "OptionPane.questionDialog.titlePane.background", new ColorUIResource(232,132,11),
                             "Table.selectionBackground", new ColorUIResource(232,132,11)
                   table.putDefaults(defaults);
    pls suggest me the how to solve this problem.
    thanks in advance
    Krishna MOhan

  • Change filename prompted when submit form by email

    My form has a submit by email button for users to submit the filled form through email(attached as pdf). Upon clicking the submit button, I want the pdf attachment to be in a customized filename (eg:YYYYMMDD_form1_txtfield1.pdf), or the least if user choose to submit using external webmail and prompted to first save the file, the filename(on the Save As dialog) will automatically be set to the customized filename.
    Is this possible? or Is there any other alternatives? I had went through a number of forums/articles on this but I did not find the solution.
    Thanks loads.

    The send pdf in an email will save the fiel as is in a temp folder with the name of the PDF that already exists. If you want to change that name you will have to do a file save operation. For security reasons you cannot automate the file save without the user's knowledge (they have to click OK). I do not know of a way to seed the SaveAs dialog with the filename that you want.
    Paul

  • 10.9.2 Finder Freezes when resizing and changing directories

    I just updated to 10.9.2 to find that when the Finder is open, and I resize the Finder, for instance to stack two windows side by side ... the Finder freezes when I simply drag the corner of the window around.
    Similar thing happens when I click on a different folder.
    Seems pretty odd given that I have a recent system with an SSD, and I didn't have the problem before.
    10.9.2 mac mini '13 core i7 16GB RAM 256GB SSD

    Also, if I scroll the lower right edge around in a circle, the bottom part of the Finder window locks up.
    This is what Console says about it:
    2/27/14 2:12:46.957 PM com.apple.IconServicesAgent[239]: main Failed to composit image for binding VariantBinding [0x7d7] flags: 0x8 binding: FileInfoBinding [0x545] - extension: tiff, UTI: public.tiff, fileType: ????.
    2/27/14 2:12:46.958 PM quicklookd[3313]: Warning: Cache image returned by the server has size range covering all valid image sizes. Binding: VariantBinding [0x403] flags: 0x8 binding: FileInfoBinding [0x303] - extension: tiff, UTI: public.tiff, fileType: ???? request size:16 scale: 1
    2/27/14 2:12:55.184 PM WindowServer[115]: disable_update_timeout: UI updates were forcibly disabled by application "Finder" for over 1.00 seconds. Server has re-enabled them.
    2/27/14 2:13:09.184 PM WindowServer[115]: disable_update_likely_unbalanced: UI updates still disabled by application "Finder" after 15.00 seconds (server forcibly re-enabled them after 1.00 seconds). Likely an unbalanced disableUpdate call.
    2/27/14 2:13:13.263 PM com.apple.IconServicesAgent[239]: Icon filename entry missing from bundle info dictionary for bundle at URL: file:///System/Library/Frameworks/AppKit.framework/Versions/C/XPCServices/com.a pple.appkit.xpc.openAndSavePanelService.xpc/
    2/27/14 2:13:13.272 PM com.apple.IconServicesAgent[239]: Icon filename entry missing from bundle info dictionary for bundle at URL: file:///System/Library/CoreServices/Dock.app/Contents/XPCServices/com.apple.doc k.extra.xpc/
    2/27/14 2:13:13.275 PM com.apple.IconServicesAgent[239]: Icon filename entry missing from bundle info dictionary for bundle at URL: file:///System/Library/PrivateFrameworks/InternetAccounts.framework/Versions/A/ XPCServices/com.apple.internetaccounts.xpc/
    2/27/14 2:13:13.277 PM com.apple.IconServicesAgent[239]: Icon filename entry missing from bundle info dictionary for bundle at URL: file:///System/Library/PrivateFrameworks/MailService.framework/Versions/A/XPCSe rvices/com.apple.MailServiceAgent.xpc/
    2/27/14 2:13:13.369 PM com.apple.IconServicesAgent[239]: Icon filename entry missing from bundle info dictionary for bundle at URL: file:///System/Library/PrivateFrameworks/WebKit2.framework/Versions/A/XPCServic es/com.apple.WebKit.WebContent.xpc/
    2/27/14 2:13:13.399 PM com.apple.IconServicesAgent[239]: Icon filename entry missing from bundle info dictionary for bundle at URL: file:///System/Library/Frameworks/QTKit.framework/Versions/A/XPCServices/com.ap ple.qtkitserver.xpc/
    2/27/14 2:13:13.404 PM com.apple.IconServicesAgent[239]: Icon filename entry missing from bundle info dictionary for bundle at URL: file:///System/Library/PrivateFrameworks/WebKit2.framework/Versions/A/XPCServic es/com.apple.WebKit.Networking.xpc/
    2/27/14 2:13:13.413 PM com.apple.IconServicesAgent[239]: Icon filename entry missing from bundle info dictionary for bundle at URL: file:///System/Library/PrivateFrameworks/ShareKit.framework/Versions/A/XPCServi ces/com.apple.ShareKitHelper.xpc/
    2/27/14 2:13:14.420 PM WindowServer[115]: common_reenable_update: UI updates were finally reenabled by application "Finder" after 20.24 seconds (server forcibly re-enabled them after 1.00 seconds)
    2/27/14 2:13:14.597 PM Finder[399]: void CGSUpdateManager::log() const: conn 0x1770f: spurious update.
    2/27/14 2:13:33.273 PM WindowServer[115]: disable_update_timeout: UI updates were forcibly disabled by application "Finder" for over 1.00 seconds. Server has re-enabled them.
    2/27/14 2:13:47.273 PM WindowServer[115]: disable_update_likely_unbalanced: UI updates still disabled by application "Finder" after 15.00 seconds (server forcibly re-enabled them after 1.00 seconds). Likely an unbalanced disableUpdate call.
    2/27/14 2:14:00.407 PM WindowServer[115]: common_reenable_update: UI updates were finally reenabled by application "Finder" after 28.13 seconds (server forcibly re-enabled them after 1.00 seconds)
    2/27/14 2:14:00.542 PM Finder[399]: void CGSUpdateManager::log() const: conn 0x1770f: spurious update.
    2/27/14 2:16:54.436 PM netbiosd[2747]: name servers down?
    2/27/14 2:24:34.512 PM parentalcontrolsd[3345]: StartObservingFSEvents [849:] -- *** StartObservingFSEvents started event stream
    2/27/14 2:25:31.936 PM WindowServer[115]: disable_update_timeout: UI updates were forcibly disabled by application "Finder" for over 1.00 seconds. Server has re-enabled them.
    2/27/14 2:25:45.935 PM WindowServer[115]: disable_update_likely_unbalanced: UI updates still disabled by application "Finder" after 15.00 seconds (server forcibly re-enabled them after 1.00 seconds). Likely an unbalanced disableUpdate call.
    2/27/14 2:25:50.959 PM Console[3347]: setPresentationOptions called with NSApplicationPresentationFullScreen when there is no visible fullscreen window; this call will be ignored.
    2/27/14 2:25:57.046 PM WindowServer[115]: common_reenable_update: UI updates were finally reenabled by application "Finder" after 26.11 seconds (server forcibly re-enabled them after 1.00 seconds)
    2/27/14 2:25:57.182 PM Finder[399]: void CGSUpdateManager::log() const: conn 0x1770f: spurious update.

  • How to prevent JFileChooser automatically changing to parent directory?

    When you show only directories, and click on the dir icons to navigate, and then dont select anything and click OK, it automatically 'cd's to the parent folder.
    My application is using the JFileChooser to let the user navigate through folders and certain details of 'foo' files in that folder are displayed in another panel.
    So we dont want the chooser automatically changing dir to parent when OK is clicked. How to prevent this behavior?
    I considered extending the chooser and looked at the Swing source code but it is hard to tell where the change dir is happening.
    thanks,
    Anil
    To demonstrate this, I took the standard JFileChooserDemo from the Sun tutorial and modified it adding these lines
              // NEW line 45 in constructor
              fc.addPropertyChangeListener((PropertyChangeListener) this);
              fc.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
          * NEW -
          * @see java.awt.event.ActionListener#actionPerformed(java.awt.event.ActionEvent)
         public void propertyChange(PropertyChangeEvent e) {
              String prop = e.getPropertyName();
              if (JFileChooser.DIRECTORY_CHANGED_PROPERTY.equals(prop)) {
                   System.out.println("DIRECTORY_CHANGED_PROPERTY");
                   File file = (File) e.getNewValue();
                   System.out.println("DIRECTORY:" + file.getPath());
         }

    Here is the demo:
    package filechooser;
    import java.awt.BorderLayout;
    import java.awt.Insets;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import java.beans.PropertyChangeEvent;
    import java.beans.PropertyChangeListener;
    import java.io.File;
    import javax.swing.ImageIcon;
    import javax.swing.JButton;
    import javax.swing.JFileChooser;
    import javax.swing.JFrame;
    import javax.swing.JPanel;
    import javax.swing.JScrollPane;
    import javax.swing.JTextArea;
    import javax.swing.SwingUtilities;
    import javax.swing.UIManager;
    * FileChooserDemo.java uses these files:
    *   images/Open16.gif
    *   images/Save16.gif
    public class FileChooserDemo extends JPanel implements ActionListener,
              PropertyChangeListener {
         static private final String newline = "\n";
         JButton openButton, saveButton;
         JTextArea log;
         JFileChooser fc;
         public FileChooserDemo() {
              super(new BorderLayout());
              // Create the log first, because the action listeners
              // need to refer to it.
              log = new JTextArea(5, 20);
              log.setMargin(new Insets(5, 5, 5, 5));
              log.setEditable(false);
              JScrollPane logScrollPane = new JScrollPane(log);
              // Create a file chooser
              fc = new JFileChooser();
              // NEW
              fc.addPropertyChangeListener((PropertyChangeListener) this);
              fc.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
              // Create the open button. We use the image from the JLF
              // Graphics Repository (but we extracted it from the jar).
              openButton = new JButton("Open a File...",
                        createImageIcon("images/Open16.gif"));
              openButton.addActionListener(this);
              // Create the save button. We use the image from the JLF
              // Graphics Repository (but we extracted it from the jar).
              saveButton = new JButton("Save a File...",
                        createImageIcon("images/Save16.gif"));
              saveButton.addActionListener(this);
              // For layout purposes, put the buttons in a separate panel
              JPanel buttonPanel = new JPanel(); // use FlowLayout
              buttonPanel.add(openButton);
              buttonPanel.add(saveButton);
              // Add the buttons and the log to this panel.
              add(buttonPanel, BorderLayout.PAGE_START);
              add(logScrollPane, BorderLayout.CENTER);
          * NEW -
          * @see java.awt.event.ActionListener#actionPerformed(java.awt.event.ActionEvent)
         public void propertyChange(PropertyChangeEvent e) {
              String prop = e.getPropertyName();
              // If the directory changed, don't show an image.
              if (JFileChooser.DIRECTORY_CHANGED_PROPERTY.equals(prop)) {
                   System.out.println("DIRECTORY_CHANGED_PROPERTY");
                   File file = (File) e.getNewValue();
                   System.out.println("DIRECTORY:" + file.getPath());
         public void actionPerformed(ActionEvent e) {
              // Handle open button action.
              if (e.getSource() == openButton) {
                   int returnVal = fc.showOpenDialog(FileChooserDemo.this);
                   if (returnVal == JFileChooser.APPROVE_OPTION) {
                        File file = fc.getSelectedFile();
                        // This is where a real application would open the file.
                        log.append("Opening: " + file.getName() + "." + newline);
                   } else {
                        log.append("Open command cancelled by user." + newline);
                   log.setCaretPosition(log.getDocument().getLength());
                   // Handle save button action.
              } else if (e.getSource() == saveButton) {
                   int returnVal = fc.showSaveDialog(FileChooserDemo.this);
                   if (returnVal == JFileChooser.APPROVE_OPTION) {
                        File file = fc.getSelectedFile();
                        // This is where a real application would save the file.
                        log.append("Saving: " + file.getName() + "." + newline);
                   } else {
                        log.append("Save command cancelled by user." + newline);
                   log.setCaretPosition(log.getDocument().getLength());
         /** Returns an ImageIcon, or null if the path was invalid. */
         protected static ImageIcon createImageIcon(String path) {
              java.net.URL imgURL = FileChooserDemo.class.getResource(path);
              if (imgURL != null) {
                   return new ImageIcon(imgURL);
              } else {
                   System.err.println("Couldn't find file: " + path);
                   return null;
          * Create the GUI and show it. For thread safety, this method should be
          * invoked from the event dispatch thread.
         private static void createAndShowGUI() {
              // Create and set up the window.
              JFrame frame = new JFrame("FileChooserDemo");
              frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              // Add content to the window.
              frame.add(new FileChooserDemo());
              // Display the window.
              frame.pack();
              frame.setVisible(true);
         public static void main(String[] args) {
              // Schedule a job for the event dispatch thread:
              // creating and showing this application's GUI.
              SwingUtilities.invokeLater(new Runnable() {
                   public void run() {
                        // Turn off metal's use of bold fonts
                        UIManager.put("swing.boldMetal", Boolean.FALSE);
                        createAndShowGUI();
    }

  • FTP filename changes

    Hello,
      In a FILE to FILE scenario we would like to change the name of the file.
    let's say filename on the sender side is 'datafile' and we would like it to be 'infodatafile' on the receiver side.
    So add the 'info' string to the filename.
    Anybody knows if this is possible ?
    Thanks

    Hi,
    I guess ur just doing File to File scenario without IR configuartion..in that case ID when u r creating communication channel for File receiver there itself in file name scheme u need to put "infodatafile"
    and in sender file communication channel put file name scheme as "datafile"
    so file with datafile is picked up and file with infodatafile is created.
    Regards,
    Manisha

  • Filename changing

    I don’t remember making any changes to my preferences so am at a loss as to why suddenly in recent weeks if I save a .jpg to my downloads folder or to my desktop when I upload it to another site the Saved As information shows up as:
    /Users/myfullname/Desktop/the saved name.jpg
    Not wanting to post anything on public sites that gives this sort of information I am here to ask whether it is possible change whatever so as to show only the filename I give to the image without the personal information.
    Any advice will be appreciated.

    Thank you Kappy for your reply.
    I followed your link and can see how to change my name using ACCOUNT via System Preferences but what confuses me is why, suddenly, I am seeing it in the uploaded file path for the first time in the six months I have owned my MacBook
    I use Firefox 3.5 as my main browser to down load images, save them as ......jpg to either my user>library> download folder or, more usually to my desktop where they show up with only the name I have given them.
    It is not until I upload it that my user>full name is added to the file name. I can see nothing within Firefox preferences that allows me to change the file name information that appears
    But, and I realize I should have done this before I posted my question, if I use Safari only the name.jpg appears.
    I guess I can avoid having to change my account name simply by using Safari, but would be interested to know if anyone can explain why Firefox adds my user>name to the file path not if I use Safari.
    What you are seeing is the full path to where the file is located on your hard drive. You should never use your full name for your account username or short name. Perhaps you should consider changing it to something else. See Macworld | Changing the short username in Leopard.
    When you view the file after you have uploaded it to another site is the full path included along with the filename? If so, then what application do you use to upload the file and have you checked if it's configured to include that information.
    Mac Pro 2.66 Ghz; MBP Unibody; MBP C2D 2.33 Ghz; MBP 2.16 Ghz   Mac OS X (10.5.7)   iMac C2D 17"; MB 2.0 Ghz; 80GB iPod Video; iPod Touch; iPod Nano 2GB  

  • Mass filename changes using terminal? How?

    Hello,
    I recently put a Linksys NAS on my network. Unfortunately, the EXT3 format used on the disks does not like filenames with special characters such as "/" or "?". So I cannot copy files from my PowerBook to the NAS with these characters in their names.
    A search of my hard drive shows 800+ files with these forbidden characters.
    Is there a way to use terminal (or any aspect of OS X) to do a mass change of these characters to a more acceptable character (i.e. changing all instances of "/" to "-")?
    Thanks for the help.
    Jim

    Jim
    tcsh: Invalid null commandAh, you're using tcsh. Bad news! I'm sure it could be made to work, but I've switched to bash because it is better for this sort of stuff. Gary will tell you to switch to zsh, but for now bash will do. I just tried the command as posted and tcsh complained loudly!
    First point: often when you try to copy/paste from a browser window, you get an extra space appended to the line. It often doesn't matter, but it could here (may explain the "tcsh: Invalid null command" message). So copy the commands into a TextEdit document, which you have changed to Plain Text from the Format menu. Then be sure not to include any trailing space.
    Second point, we'll scrap the use of sudo since it is only your Home directory that you are interested in.
    Third point: as I said, we'll use bash. The prompt will change to a '$' instead of a '%'. When you've finished, you can return to tcsh with a plain exit command.
    So, copy and paste the following into the Terminal window, one line at a time, with a return after each line:
    <pre>bash
    find -d ~/Documents \( -name "?" -o -name ":" \) -exec echo 'mv "{}" `echo "{}" |
    sed -e "s^\?^_^g" -e "s^:^-^g" ` ' \; | sh</pre>This should work—it did for me!
    Note:
    it returned a > prompt with nothing else on the line.It will do this after the second line above—it is an invitation to complete the command

  • How to change directories

    how to change home directories without installing any dvd or cd ?

    See this
    Writing an effective Apple Support Communities question
    for help in writing a question others can help you with.

  • How to change directories once set

    I mistakenly entered public_ftp instead of public_html in the settings upload box. I want to delete the first directory.
    Is there any way to delete this file? If not, would a duplcation of my site allow me to change the first directory.
    Thanks. this is my first DW page....
    Dreamweaver cc
    os 10.9.1

    No sure where exactly you want to delete/Edit the root folder but if you are talking about changing in DW Site definition dialog box then you can edit it by going to:
    Site >> Manage Site
    1) Select your site from the list
    2) Click the second icon as shown in this picture
    3) Click on Servers
    4) Now make the changes for root folder as shown in this picture
    Is this what you want to do?

  • App for mass filename change

    Can anyone recommend an application for making "smart" mass file name changes?
    Example:
    I want to find an application that will:
    1.  Search through file names for a year.
    2.  Put a particular word in front of the year (without wiping out the year).
    I have Massreplaceit, but I do not think that it would do this.
    Can anyone recommend a different app?
    OS 10.8 imac
    Thanks.
    mac

    Hi, try this one...
    http://www.publicspace.net/ABetterFinderRename/

Maybe you are looking for

  • We are not able to generate pdf-files.

    Hi , I am facing issue to generate pdf files in BI .Can anyone please help me in this. i am getting error "Error while generating pdf" Regards Brijesh Prasad

  • How to create new .dat file and its contents?

    Hi There Can anybody let me know the procedure of how to create new .ctl or .dat file to load data to tables. i working on 2day dba chapter 8. it shows me how to creat table and use .dat file to load data. but doesnot giv any clue how new .dat file a

  • Entire Library gone after Safari update.

    I recently updated Safari and Java. Now when I open iPhoto my entire library is zero photos. If I boot up to a system drive running the old Safari, the library still works fine. What the **** is your problem Apple? Is there some reason I can't have a

  • Approximate equality

    Sorry to clog the boards with my question but I've exhausted all other avenues of research. I have a program that recursively generates the powers of a number. Base x to the nth power. The numbers that this program generates are sometimes large and w

  • Can't import/copy photos from disk

    Hi, My friend used her PC to make me CDs of hundreds of photos from out trip to Spain. When I pop in the disk into my MacBook Pro I can see all the images perfectly fine in my Finder but I can't figure out how to copy them or import them to iPhoto or