JTree File Browser

I have this class to browse the contents of my default folder. However it displays the
full path plus the folder & file. How would remove the path and retain the folder
and file only ?
import java.awt.*;
import java.io.*;
import javax.swing.*;
import javax.swing.tree.*;
public class Tree extends JPanel {
     static JTree tree;
     static Icon leafIcon;
     static Icon openIcon;
     static Icon closedIcon;
     static DefaultTreeCellRenderer render;
     public Tree() {
          super();
          setLayout(new GridLayout());
          final JScrollPane scrollPane = new JScrollPane();
          add(scrollPane);
       setSize(157, 311);
       DefaultMutableTreeNode root = new DefaultMutableTreeNode("Root Label");
          root.add(new DefaultMutableTreeNode("Node Label"));
          File start = new File(System.getProperty("user.dir"));
          TreeModel model = new DefaultTreeModel(new CreateNode(start));
          tree = new JTree(model);
          tree.setCellRenderer(new NodeRenderer());
          tree.setShowsRootHandles(true);
          scrollPane.setViewportView(tree);
     public static void main(String args[]) {
          Tree browse = new Tree();
          JFrame frame = new JFrame("Sample . . .");
          frame.getContentPane().add(browse, BorderLayout.CENTER);
          frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
          frame.setSize(300,300);
          frame.setLocationRelativeTo(null);
          frame.setVisible(true);
class CreateNode extends DefaultMutableTreeNode {
    CreateNode(File dir){
        super(dir);
        fillChildren(dir);
    void fillChildren(File dir){
        String[] list = dir.list();
        if( list == null ){
            return;
        for(int i=0; i<list.length; ++i){
            File child = new File(dir, list);
if(child.isDirectory()){
add(new CreateNode(child));
if(child.isFile()) {
add(new CreateNode(child));
class NodeRenderer extends DefaultTreeCellRenderer
private Icon file1 = new ImageIcon("icons/File.gif");
private Icon file2 = new ImageIcon("icons/Folder.gif");
private Icon file3 = new ImageIcon("icons/Image.gif");
public Component getTreeCellRendererComponent(JTree tree, Object value,
boolean sel, boolean expanded, boolean leaf, int row,
boolean hasFocus) {
super.getTreeCellRendererComponent(tree, value, sel, expanded, leaf,
row, hasFocus);
DefaultMutableTreeNode node = (DefaultMutableTreeNode) value;
File file = (File) node.getUserObject();
String name = file.getName();
if (name.endsWith(".gif")) {
setIcon(file3);
} else if (file.isDirectory()) {
setIcon(file2);
} else {
setIcon(file1);
return this;
public NodeRenderer() {
super();

In your node renderer:
      // This is what you have:
      DefaultMutableTreeNode node = (DefaultMutableTreeNode) value;
      File file = (File) node.getUserObject();
      String name = file.getName();
      // This is what you missed:
      setText(name);

Similar Messages

  • JTree File Browser solutions and a problem

    Hi everyone I have recently needed to create a file browser that allows addition, deletions and rename of files/directores using a JTree component.
    I have searched the Sun web site and found a number of examples and from what I can see there are more or less two solutions. The first is to use the DefaultTreeModel and the DefaultMutableTreeNode classes and the other is to implement a new TreeModel taking advantage of a the File objects tree structure. This I found at;
    http://java.sun.com/products/jfc/tsc/articles/jtree/
    This to me seemed a very elegant solution. However it doesn't contain deletion, addition etc. So far I have tried to implement the addition of files but I have run into problems. The problem I have is that when I add a file a blank space ends up on the JTree view. If someone could take a look and suggest where I am going wrong I would be very greatful. The methods below I added to the FileSystemModel.java class from the url above.
         public File[] getPathToRoot(File file) {
         return getPathToRoot(file, 0);
        protected File[] getPathToRoot(File file, int i) {                              
         File[] files;
         if (file == null) {
             if (i == 0){
              return null;
             files = new File;
         } else {
         i++;
         if (file.equals( getRoot())){
                   files = new File[i];
              }else{
              files = getPathToRoot(file.getParentFile(), i);
         files[files.length - i] = file;
         return files;
    public void insertFileInto(String newFilePath, File parent) {
         File newFile = new File(parent, newFilePath);
         try{
              newFile.createNewFile();          
              } catch ( IOException io){
                             System.out.println("io ex");
         filesWereInserted( parent,newFile);
    public void filesWereInserted(File file, File newFile) {          
         if (listenerList != null && file != null ) {
         Object[] objects = new Object[1];
              objects[0] = newFile;
              int [] is = new int[1];
              is[0] = 0;
         fireTreeNodesInserted(new TreeModelEvent(this, getPathToRoot(file), is, objects));
    I basically looked at the DefaultTreeModel and tried to simluate the behaviour for files.
    Since I have had this problem I remembered that out of the two solutions I have seen for a file browser the first is far more common. Perhaps I have chosse the wrong solution. Before I switch to the other soluion I thought I'ld put my problem to you guys and ask what you think the best solution is.
    Thanks for any help :)

    You are right this is a bad idea. You really want to implement delay loading. This means that your tree start out with only the top level folder expanded and dummy nodes in the folders that have children. Then using the expand events you can remove your dummy node and put in the real nodes before the tree displays the children. On the collapse event you can remove the real nodes and put back your dummy node (or you can leave the real nodes, that just means that eventually customers could have nodes for the entire system in memory, with a little work on their part:-). This way you only read the part of the file system that is visible and you only have the currently visible nodes in memory. I am sure you can find some examples of this technique.
    While this could be done with the default models I feel that a custom model would be the way to go.
    IL

  • Creating file browser GUI using java swing tree

    Hi all,
    I have some questions which i wish to clarify asap. I am working on a file browser project using java swing. I need to create 2 separate buttons. 1 of them will add a 'folder' while the other button will add a 'file' to the tree when the buttons are clicked once. The sample source code known as 'DynamicTreeDemo' which is found in the java website only has 1 add button which is not what i want. Please help if you know how the program should be written. Thx a lot.
    Regards,

    Sorry, don't know 'DynamicTreeDemo'import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.event.*;
    import javax.swing.tree.*;
    import java.io.File;
    public class Test extends JFrame {
      JTree jt = new JTree();
      DefaultTreeModel dtm = (DefaultTreeModel)jt.getModel();
      JButton newDir = new JButton("new Dir"), newFile = new JButton("new File");
      public Test() {
        setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        Container content = getContentPane();
        newDir.setEnabled(false);
        newFile.setEnabled(false);
        jt.setShowsRootHandles(true);
        content.add(new JScrollPane(jt), BorderLayout.CENTER);
        File c = new File("C:\\temp");
        DefaultMutableTreeNode root = new DefaultMutableTreeNode(c);
        dtm.setRoot(root);
        addChildren(root);
        jt.addTreeSelectionListener(new TreeSelectionListener() {
          public void valueChanged(TreeSelectionEvent tse) { select(tse) ; }
        JPanel jp = new JPanel();
        content.add(jp, BorderLayout.SOUTH);
        jp.add(newDir);
        jp.add(newFile);
        newDir.addActionListener(new ActionListener() {
          public void actionPerformed(ActionEvent ae) {
            TreePath tp = jt.getSelectionPath();
            if (tp!=null) {
              DefaultMutableTreeNode dmtn = (DefaultMutableTreeNode)tp.getLastPathComponent();
              File newFile = new File((File)dmtn.getUserObject(),"foo");
              if (newFile.mkdir()) {
                dmtn.add(new DefaultMutableTreeNode(newFile));
                dtm.nodeStructureChanged(dmtn);
              } else System.out.println("No Dir");
        newFile.addActionListener(new ActionListener() {
          public void actionPerformed(ActionEvent ae) {
            TreePath tp = jt.getSelectionPath();
            if (tp!=null) {
              DefaultMutableTreeNode dmtn = (DefaultMutableTreeNode)tp.getLastPathComponent();
              File newFile = new File((File)dmtn.getUserObject(),"foo.txt");
              try {
                if (newFile.createNewFile()) {
                  dmtn.add(new DefaultMutableTreeNode(newFile));
                  dtm.nodeStructureChanged(dmtn);
                } else System.out.println("No File");
              catch (java.io.IOException ioe) { ioe.printStackTrace(); }
        setSize(300, 300);
        setVisible(true);
      void select(TreeSelectionEvent tse) {
        TreePath tp = jt.getSelectionPath();
        newDir.setEnabled(false);
        newFile.setEnabled(false);
        if (tp!=null) {
          DefaultMutableTreeNode dmtn = (DefaultMutableTreeNode)tp.getLastPathComponent();
          File f = (File)dmtn.getUserObject();
          if (f.isDirectory()) {
            newDir.setEnabled(true);
            newFile.setEnabled(true);
      void addChildren(DefaultMutableTreeNode parent) {
        File parentFile = (File)parent.getUserObject();
        File[] children = parentFile.listFiles();
        for (int i=0; i<children.length; i++) {
          DefaultMutableTreeNode child = new DefaultMutableTreeNode(children);
    parent.add(child);
    if (children[i].isDirectory()) addChildren(child);
    public static void main(String[] args) { new Test(); }

  • 3.1EA1 File browser bug?

    When I load the Files browser/viewer, it seems to hang when expanding various folder that previously were handled without a problem. I just get the loading... text but nothing ever happens. At this point, the only way for me to load files is via just using File/Open... Is anyone else experiencing this?

    Gary,
    Thanks for the info on running it from the command line - I hadn't done that before. Here is the dump:
    Microsoft Windows [Version 6.1.7601]
    Copyright (c) 2009 Microsoft Corporation. All rights reserved.
    H:\>c:
    C:\>cd program files\sqldeveloper3.1
    C:\Program Files\sqldeveloper3.1>cd sqldeveloper\bin
    C:\Program Files\sqldeveloper3.1\sqldeveloper\bin>sqldeveloper
    Registered TimesTen
    Exception in thread "IconOverlayTracker Timer" java.lang.OutOfMemoryError: Java heap space
    at java.util.Arrays.copyOf(Arrays.java:2882)
    at java.lang.AbstractStringBuilder.expandCapacity(AbstractStringBuilder.java:100)
    at java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:390)
    at java.lang.StringBuffer.append(StringBuffer.java:224)
    at org.tmatesoft.svn.core.SVNErrorMessage.getFullMessage(SVNErrorMessage.java:257)
    at org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:58)
    at org.tmatesoft.svn.core.internal.wc.admin.SVNAdminAreaFactory.open(SVNAdminAreaFactory.java:163)
    at org.tmatesoft.svn.core.internal.wc.admin.SVNWCAccess.doOpen(SVNWCAccess.java:364)
    at org.tmatesoft.svn.core.internal.wc.admin.SVNWCAccess.open(SVNWCAccess.java:272)
    at org.tmatesoft.svn.core.internal.wc.admin.SVNWCAccess.open(SVNWCAccess.java:265)
    at org.tmatesoft.svn.core.internal.wc.admin.SVNWCAccess.open(SVNWCAccess.java:261)
    at org.tmatesoft.svn.core.wc.SVNStatusClient.doStatus(SVNStatusClient.java:316)
    at org.tmatesoft.svn.core.javahl.SVNClientImpl.status(SVNClientImpl.java:296)
    at org.tmatesoft.svn.core.javahl.SVNClientImpl.status(SVNClientImpl.java:278)
    at org.tigris.subversion.svnclientadapter.javahl.AbstractJhlClientAdapter.getStatus(AbstractJhlClientAdapter.java:480)
    at org.tigris.subversion.svnclientadapter.svnkit.SvnKitClientAdapter.getStatus(SvnKitClientAdapter.java:141)
    at org.tigris.subversion.svnclientadapter.javahl.AbstractJhlClientAdapter.getStatus(AbstractJhlClientAdapter.java:466)
    at oracle.jdevimpl.vcs.svn.SVNURLInfoCacheSimpleStrategy.getURLInfo(SVNURLInfoCacheSimpleStrategy.java:79)
    at oracle.jdevimpl.vcs.svn.SVNURLInfoCache.getPropStatus(SVNURLInfoCache.java:59)
    at oracle.jdevimpl.vcs.svn.SVNStatusResolver.getStatus(SVNStatusResolver.java:159)
    at oracle.jdevimpl.vcs.svn.SVNStatusResolver.populateStatuses(SVNStatusResolver.java:82)
    at oracle.jdevimpl.vcs.generic.GenericClient$2.getImpl(GenericClient.java:531)
    at oracle.jdeveloper.vcs.spi.VCSStatusCache.getValuesImpl(VCSStatusCache.java:31)
    at oracle.jdeveloper.vcs.spi.VCSURLBasedCache.getValues(VCSURLBasedCache.java:107)
    at oracle.jdeveloper.vcs.spi.VCSStatusCache.get(VCSStatusCache.java:63)
    at oracle.jdeveloper.vcs.spi.VCSOverlayItemProducer.getOverlayItems(VCSOverlayItemProducer.java:63)
    at oracle.jdeveloper.vcs.spi.VCSNodeOverlayTracker.getOverlays(VCSNodeOverlayTracker.java:288)
    at oracle.ide.explorer.IconOverlayTracker.processPendingNodes(IconOverlayTracker.java:574)
    at oracle.ide.explorer.IconOverlayTracker.access$1400(IconOverlayTracker.java:69)
    at oracle.ide.explorer.IconOverlayTracker$7.run(IconOverlayTracker.java:487)
    at java.util.TimerThread.mainLoop(Timer.java:512)
    at java.util.TimerThread.run(Timer.java:462)
    Exception in thread "AWT-EventQueue-0" java.lang.IllegalStateException: Timer already cancelled.
    at java.util.Timer.sched(Timer.java:354)
    at java.util.Timer.schedule(Timer.java:170)
    at oracle.ide.explorer.IconOverlayTracker$NodeWatcher.updateVisibleNodes(IconOverlayTracker.java:802)
    at oracle.ide.explorer.IconOverlayTracker$NodeWatcher.access$3000(IconOverlayTracker.java:713)
    at oracle.ide.explorer.IconOverlayTracker$NodeWatcher$NodeUserListener.treeExpanded(IconOverlayTracker.java:969)
    at javax.swing.JTree.fireTreeExpanded(JTree.java:2666)
    at javax.swing.JTree.setExpandedState(JTree.java:3427)
    at javax.swing.JTree.expandPath(JTree.java:2163)
    at javax.swing.plaf.basic.BasicTreeUI.toggleExpandState(BasicTreeUI.java:2209)
    at javax.swing.plaf.basic.BasicTreeUI.handleExpandControlClick(BasicTreeUI.java:2196)
    at javax.swing.plaf.basic.BasicTreeUI.checkForClickInExpandControl(BasicTreeUI.java:2154)
    at com.jgoodies.looks.plastic.PlasticTreeUI.access$900(PlasticTreeUI.java:120)
    at com.jgoodies.looks.plastic.PlasticTreeUI$MouseHandler.mousePressed(PlasticTreeUI.java:276)
    at java.awt.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java:262)
    at java.awt.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java:262)
    at java.awt.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java:262)
    at java.awt.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java:262)
    at java.awt.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java:262)
    at java.awt.Component.processMouseEvent(Component.java:6131)
    at javax.swing.JComponent.processMouseEvent(JComponent.java:3265)
    at oracle.ideimpl.explorer.CustomTree.processMouseEvent(CustomTree.java:220)
    at java.awt.Component.processEvent(Component.java:5899)
    at java.awt.Container.processEvent(Container.java:2023)
    at java.awt.Component.dispatchEventImpl(Component.java:4501)
    at java.awt.Container.dispatchEventImpl(Container.java:2081)
    at java.awt.Component.dispatchEvent(Component.java:4331)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4301)
    at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3962)
    at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3895)
    at java.awt.Container.dispatchEventImpl(Container.java:2067)
    at java.awt.Window.dispatchEventImpl(Window.java:2458)
    at java.awt.Component.dispatchEvent(Component.java:4331)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
    java.lang.IllegalStateException: Timer already cancelled.
    at java.util.Timer.sched(Timer.java:354)
    at java.util.Timer.schedule(Timer.java:170)
    at oracle.ide.explorer.IconOverlayTracker._scheduleUpdateTask(IconOverlayTracker.java:498)
    at oracle.ide.explorer.IconOverlayTracker.scheduleUpdateTask(IconOverlayTracker.java:449)
    at oracle.ide.explorer.IconOverlayTracker.repaintConsumerOverlays(IconOverlayTracker.java:432)
    at oracle.ide.explorer.IconOverlayTracker.access$000(IconOverlayTracker.java:69)
    at oracle.ide.explorer.IconOverlayTracker$2.stateChanged(IconOverlayTracker.java:114)
    at oracle.ide.explorer.IconOverlayTracker$NodeWatcher.setVisibleNodes(IconOverlayTracker.java:843)
    at oracle.ide.explorer.IconOverlayTracker$NodeWatcher.access$2800(IconOverlayTracker.java:713)
    at oracle.ide.explorer.IconOverlayTracker$NodeWatcher$4.run(IconOverlayTracker.java:818)
    at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
    2011-11-04 10:57:04
    Full thread dump Java HotSpot(TM) Client VM (11.0-b16 mixed mode):
    "AWT-EventQueue-0" prio=6 tid=0x06cb3800 nid=0x1fcc in Object.wait() [0x063ff000..0x063ff9e8]
    java.lang.Thread.State: WAITING (on object monitor)
    at java.lang.Object.wait(Native Method)
    at java.lang.Object.wait(Object.java:485)
    at java.awt.EventQueue.getNextEvent(EventQueue.java:479)
    - locked <0x121a84c8> (a java.awt.EventQueue)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:236)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
    "Timer-2" daemon prio=6 tid=0x06cb2c00 nid=0x246c in Object.wait() [0x09e5f000..0x09e5fae8]
    java.lang.Thread.State: TIMED_WAITING (on object monitor)
    at java.lang.Object.wait(Native Method)
    at java.util.TimerThread.mainLoop(Timer.java:509)
    - locked <0x13d2f710> (a java.util.TaskQueue)
    at java.util.TimerThread.run(Timer.java:462)
    "IconOverlayTracker Timer" prio=6 tid=0x06cb4800 nid=0x1f9c in Object.wait() [0x0c4bf000..0x0c4bfc68]
    java.lang.Thread.State: WAITING (on object monitor)
    at java.lang.Object.wait(Native Method)
    at java.lang.Object.wait(Object.java:485)
    at java.util.TimerThread.mainLoop(Timer.java:483)
    - locked <0x13a6f288> (a java.util.TaskQueue)
    at java.util.TimerThread.run(Timer.java:462)
    "Swing-Shell" daemon prio=6 tid=0x06cb2400 nid=0x18f8 waiting on condition [0x0b90f000..0x0b90fae8]
    java.lang.Thread.State: WAITING (parking)
    at sun.misc.Unsafe.park(Native Method)
    - parking to wait for <0x134e2bb0> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
    at java.util.concurrent.locks.LockSupport.park(LockSupport.java:158)
    at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:1925)
    at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:358)
    at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:947)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
    at sun.awt.shell.Win32ShellFolderManager2$ComInvoker$3.run(Win32ShellFolderManager2.java:458)
    at java.lang.Thread.run(Thread.java:619)
    "WaitCursor-Timer" prio=6 tid=0x06cb2000 nid=0x124c in Object.wait() [0x09aff000..0x09affb68]
    java.lang.Thread.State: WAITING (on object monitor)
    at java.lang.Object.wait(Native Method)
    at java.lang.Object.wait(Object.java:485)
    at java.util.TimerThread.mainLoop(Timer.java:483)
    - locked <0x134b8a58> (a java.util.TaskQueue)
    at java.util.TimerThread.run(Timer.java:462)
    "Native Directory Watcher" prio=2 tid=0x06cb1400 nid=0xdf8 runnable [0x088ef000..0x088efbe8]
    java.lang.Thread.State: RUNNABLE
    at oracle.ide.natives.NativeHandler.enterWatcherThread(Native Method)
    at oracle.ide.natives.NativeHandler$2.run(NativeHandler.java:252)
    at java.lang.Thread.run(Thread.java:619)
    "BaseTreeExplorer.NodeOpeningExecutor" prio=6 tid=0x06cb1000 nid=0x13e4 waiting on condition [0x098ff000..0x098ffc68]
    java.lang.Thread.State: WAITING (parking)
    at sun.misc.Unsafe.park(Native Method)
    - parking to wait for <0x1321b690> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
    at java.util.concurrent.locks.LockSupport.park(LockSupport.java:158)
    at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:1925)
    at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:358)
    at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:947)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
    at java.lang.Thread.run(Thread.java:619)
    "pool-2-thread-1" prio=6 tid=0x06cb0800 nid=0x1ed0 waiting on condition [0x097ff000..0x097ffce8]
    java.lang.Thread.State: WAITING (parking)
    at sun.misc.Unsafe.park(Native Method)
    - parking to wait for <0x13218fd8> (a java.util.concurrent.SynchronousQueue$TransferStack)
    at java.util.concurrent.locks.LockSupport.park(LockSupport.java:158)
    at java.util.concurrent.SynchronousQueue$TransferStack.awaitFulfill(SynchronousQueue.java:422)
    at java.util.concurrent.SynchronousQueue$TransferStack.transfer(SynchronousQueue.java:323)
    at java.util.concurrent.SynchronousQueue.take(SynchronousQueue.java:857)
    at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:947)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
    at java.lang.Thread.run(Thread.java:619)
    "Scheduler" daemon prio=6 tid=0x06cb0400 nid=0x1fc8 in Object.wait() [0x095ef000..0x095efd68]
    java.lang.Thread.State: WAITING (on object monitor)
    at java.lang.Object.wait(Native Method)
    at java.lang.Object.wait(Object.java:485)
    at oracle.dbtools.raptor.backgroundTask.TaskLinkedList.takeNextTask(TaskLinkedList.java:47)
    - locked <0x132189d8> (a oracle.dbtools.raptor.backgroundTask.TaskLinkedList)
    at oracle.dbtools.raptor.backgroundTask.RaptorTaskManager$SchedulerThread.run(RaptorTaskManager.java:444)
    "Thread-9" daemon prio=6 tid=0x06caf000 nid=0x1360 in Object.wait() [0x08def000..0x08def9e8]
    java.lang.Thread.State: WAITING (on object monitor)
    at java.lang.Object.wait(Native Method)
    - waiting on <0x130612b8> (a java.lang.ref.ReferenceQueue$Lock)
    at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:116)
    - locked <0x130612b8> (a java.lang.ref.ReferenceQueue$Lock)
    at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:132)
    at org.tmatesoft.svn.core.javahl.SVNClientImplTracker.run(SVNClientImplTracker.java:65)
    at java.lang.Thread.run(Thread.java:619)
    "Thread-7" daemon prio=6 tid=0x06caf800 nid=0x1cd8 runnable [0x08eef000..0x08eefae8]
    java.lang.Thread.State: RUNNABLE
    at sun.print.Win32PrintServiceLookup.notifyPrinterChange(Native Method)
    at sun.print.Win32PrintServiceLookup.access$100(Win32PrintServiceLookup.java:32)
    at sun.print.Win32PrintServiceLookup$PrinterChangeListener.run(Win32PrintServiceLookup.java:302)
    "ChangeSetService" prio=2 tid=0x06cadc00 nid=0x214 in Object.wait() [0x08c0f000..0x08c0fbe8]
    java.lang.Thread.State: WAITING (on object monitor)
    at java.lang.Object.wait(Native Method)
    - waiting on <0x1291aa28> (a oracle.jdevimpl.vcs.changeset.ChangeSetService)
    at java.lang.Object.wait(Object.java:485)
    at oracle.jdevimpl.vcs.changeset.ChangeSetService.awaitEvents(ChangeSetService.java:178)
    - locked <0x1291aa28> (a oracle.jdevimpl.vcs.changeset.ChangeSetService)
    at oracle.jdevimpl.vcs.changeset.ChangeSetService.eventLoop(ChangeSetService.java:199)
    at oracle.jdevimpl.vcs.changeset.ChangeSetService.access$200(ChangeSetService.java:56)
    at oracle.jdevimpl.vcs.changeset.ChangeSetService$2.run(ChangeSetService.java:138)
    at java.lang.Thread.run(Thread.java:619)
    "TimerQueue" daemon prio=6 tid=0x06caec00 nid=0xd40 in Object.wait() [0x087ef000..0x087efc68]
    java.lang.Thread.State: WAITING (on object monitor)
    at java.lang.Object.wait(Native Method)
    at javax.swing.TimerQueue.run(TimerQueue.java:236)
    - locked <0x12ea6780> (a javax.swing.TimerQueue)
    at java.lang.Thread.run(Thread.java:619)
    "TimedCache-Timer" daemon prio=6 tid=0x04cad000 nid=0x22e4 in Object.wait() [0x06aff000..0x06affa68]
    java.lang.Thread.State: TIMED_WAITING (on object monitor)
    at java.lang.Object.wait(Native Method)
    - waiting on <0x12224ce8> (a java.util.TaskQueue)
    at java.util.TimerThread.mainLoop(Timer.java:509)
    - locked <0x12224ce8> (a java.util.TaskQueue)
    at java.util.TimerThread.run(Timer.java:462)
    "JarIndex Timer" daemon prio=6 tid=0x04c94800 nid=0x11cc in Object.wait() [0x069ff000..0x069ffae8]
    java.lang.Thread.State: TIMED_WAITING (on object monitor)
    at java.lang.Object.wait(Native Method)
    at java.util.TimerThread.mainLoop(Timer.java:509)
    - locked <0x121a8418> (a java.util.TaskQueue)
    at java.util.TimerThread.run(Timer.java:462)
    "AWT-Windows" daemon prio=6 tid=0x04c74c00 nid=0x13dc runnable [0x0546f000..0x0546fc68]
    java.lang.Thread.State: RUNNABLE
    at sun.awt.windows.WToolkit.eventLoop(Native Method)
    at sun.awt.windows.WToolkit.run(WToolkit.java:291)
    at java.lang.Thread.run(Thread.java:619)
    "AWT-Shutdown" prio=6 tid=0x04c73c00 nid=0x265c in Object.wait() [0x0536f000..0x0536fce8]
    java.lang.Thread.State: WAITING (on object monitor)
    at java.lang.Object.wait(Native Method)
    - waiting on <0x121a8620> (a java.lang.Object)
    at java.lang.Object.wait(Object.java:485)
    at sun.awt.AWTAutoShutdown.run(AWTAutoShutdown.java:259)
    - locked <0x121a8620> (a java.lang.Object)
    at java.lang.Thread.run(Thread.java:619)
    "Java2D Disposer" daemon prio=10 tid=0x04c69400 nid=0x17dc in Object.wait() [0x0526f000..0x0526fd68]
    java.lang.Thread.State: WAITING (on object monitor)
    at java.lang.Object.wait(Native Method)
    at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:116)
    - locked <0x121a86b0> (a java.lang.ref.ReferenceQueue$Lock)
    at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:132)
    at sun.java2d.Disposer.run(Disposer.java:125)
    at java.lang.Thread.run(Thread.java:619)
    "Low Memory Detector" daemon prio=6 tid=0x01f00800 nid=0x1664 runnable [0x00000000..0x00000000]
    java.lang.Thread.State: RUNNABLE
    "CompilerThread0" daemon prio=10 tid=0x01efcc00 nid=0x15f4 waiting on condition [0x00000000..0x048af790]
    java.lang.Thread.State: RUNNABLE
    "Attach Listener" daemon prio=10 tid=0x01efbc00 nid=0x1af4 runnable [0x00000000..0x00000000]
    java.lang.Thread.State: RUNNABLE
    "Signal Dispatcher" daemon prio=10 tid=0x01ef3000 nid=0x1388 waiting on condition [0x00000000..0x00000000]
    java.lang.Thread.State: RUNNABLE
    "Finalizer" daemon prio=8 tid=0x01edc800 nid=0x118c in Object.wait() [0x045af000..0x045afc68]
    java.lang.Thread.State: WAITING (on object monitor)
    at java.lang.Object.wait(Native Method)
    at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:116)
    - locked <0x12140298> (a java.lang.ref.ReferenceQueue$Lock)
    at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:132)
    at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:159)
    "Reference Handler" daemon prio=10 tid=0x01edb000 nid=0x2178 in Object.wait() [0x044af000..0x044afce8]
    java.lang.Thread.State: WAITING (on object monitor)
    at java.lang.Object.wait(Native Method)
    at java.lang.Object.wait(Object.java:485)
    at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:116)
    - locked <0x12140320> (a java.lang.ref.Reference$Lock)
    "main" prio=6 tid=0x01feb000 nid=0x24f8 waiting on condition [0x00000000..0x0012fab0]
    java.lang.Thread.State: RUNNABLE
    "VM Thread" prio=10 tid=0x01ed7c00 nid=0x2380 runnable
    "VM Periodic Task Thread" prio=10 tid=0x01f01800 nid=0x1464 waiting on condition
    JNI global references: 2757
    Heap
    def new generation total 45376K, used 4688K [0x0f010000, 0x12140000, 0x12140000)
    eden space 40384K, 11% used [0x0f010000, 0x0f4a4108, 0x11780000)
    from space 4992K, 0% used [0x11780000, 0x11780000, 0x11c60000)
    to space 4992K, 0% used [0x11c60000, 0x11c60000, 0x12140000)
    tenured generation total 604992K, used 336131K [0x12140000, 0x37010000, 0x37010000)
    the space 604992K, 55% used [0x12140000, 0x26980ed8, 0x26981000, 0x37010000)
    compacting perm gen total 57088K, used 56897K [0x37010000, 0x3a7d0000, 0x3f010000)
    the space 57088K, 99% used [0x37010000, 0x3a7a0568, 0x3a7a0600, 0x3a7d0000)
    No shared spaces configured.

  • Error: Unable to locate an image file browser...

    I get the error below when I insert an image element and try to associate a picture to it by either double clicking it or using the browse button in the Draw palette.
    I have looked in my install directory and the "FileSystemBrowser.dll" file is present as well as the "ImageFileBrowserIDL.dll" file, so what gives?
    Running LiveCycle ES2 9.0.0.2.20120627.2.874785

    Hi,
    you should be able to fix that problem by re-registering Designer file browser DLL.
    http://thelivecycle.blogspot.de/2014/02/diy-bugfix-image-file-browser.html

  • Is there a way to see a file browser on iCloud? It says my account is filled up to 5G already and I can't imagine what it moved over to there that was that big.

    Is there a way to see a file browser on iCloud? It says my account is filled up to 5G already and I can't imagine what it moved over to there that was that big.
    I'm wondering if it moved my rhapsody music to the cloud (which is pointless) so I shut off 'document' sharing in case that's the problem, but it's still saying I'm at 5G right now.
    When I go to icloud.com all I see is the dumb app icons, with no clue as to what's taking up that disk space.
    btw, I did not sync photos from the get-go.
    A file browser? please? I need to see my cloud.
    sigh

    Have you enabled Automatic Downloads on all of your devices? This would download all of the books to all of your devices when you download on any device - as long as you are using the same Apple ID and iTunes account on all of your devices.
    Go to Settings>Store>Automatic Downloads>Books>On. When you download a book on one iDevice, it will download to all of your iDevices. This will only work for downloads moving forward from the moment that you turn the setting on. You will have to download the previously purchased books to all of your other devices.
    With iCloud, you can start reading the book on one device and then pickup where you left off on another device.

  • Why can't I see the list view in the file browser

    In the file browser for FCP X, I can see the files in the thumbnail view but when I choose "list view", I see nothing.

    Check three things: the filter popup in the upper left, the search box in the upper right, make sure there's nothing in it, and the action popup (the gear in the lower left) make sure there is no weird setting that's removing everything.
    You can also trash your preferences to reset them.

  • Iphone file browser stopped working after upgraded to IOS 5

    Hi,
    I have an iphone 3gs which I have recently upgraded to IOS 5. But to my horror after I have done that I can no longer browser my iphone's internal storage. Iphone connected to PC via USB, the file explorer no longer available. It can still sync with itune fine but there is noway I can access the storage locater in the phone via file explorer like I used to. Mind you I still have 3GB of space there.
    Is that a bug? Or I stuffed up the upgrade some where?
    Anyone else had this experience?
    Alex

    I know whats wrong now...
    My phone had been emptied after I last restored it, after I took a picture and insert the phone back to the PC. The file browser shows up again...
    That means if there is nothing in the phone, the file browser wouldn't be too bother to even show up. Weird one...

  • Possible to set the Created_by column value for File Browse?

    I'm using database account authentication and then a user gets to upload a file. Then my stored procedure reads the file. I was investigating a problem, happened to search the apex_workspace_files view and noticed the created_by column is always set to APEX_PUBLIC_USER for the files my users upload. Is there some way I can set that value when they log in, so I can track who actually did the upload?
    Thanks,
    Stew

    Dimitri,
    I was just using the standard File Browse item, so getting the blob from the workspace view. Though I've seen notes here about loading to your own table, what I had seemed to work (and was done) fairly well. There were just these little features I wanted to use...
    Thanks for the suggestion.
    Dave, I'm not sure which stored procedure you're suggesting I add the apex_custom_auth.get_username value to? I hoped that the internal File Browse routine would pick up the get_username value automatically instead of the application definition Public User value.
    Thanks,
    Stew

  • How to add a new right-click menu entry in Nautilus file browser?

    I want to add a couple of new context menu entries to Nautilus File Browser.
    So when I e.g. right-click in View Pane on a file "foobar.conf" an menu entry "edit with gedit" should appear (among the other default entries).
    When clicked the file "foobar.conf" should be passed to gedit (and gedit editor opened).
    How can I achieve this?
    Under Ubuntu there are nautilus-actions but when I try to install them in Solaris with
    pkg install nautilus-actions
    then this package is not found.
    How else can I create my own context menues?
    I would appreciate to have one script with all my context menus, which when run add them all in one step.

    To manage selected files or directories, you can use specific Nautilus variables like NAUTILUS_SCRIPT_SELECTED_FILE_PATHS.
    For more details and which variables exist, please read the content of the following URL :
    Nautilus File Manager Scripts: Questions and Answers

  • Open Cursor Issue because of file browse Item - Is this a Bug in APEX 3.2

    Hi All,
    I am using file browse Item to upload file into the database at two places in my application, but it seems whenever I am submitting those two pages, with file path or without file path, its opening an cursor which remains open after that, because of this open cursor count in the application is getting exceeding every time.
    For testing this I have made an dummy page containing just file browse item and submit button, and still it is increasing the open cursor count.
    Is this a bug in Apex file browse item or there is some other way to handle this.
    Please kindly help me in the above issue as this is affecting the production application.
    Thanks & Regards
    Sanjay
    Edited by: user11204334 on Dec 5, 2010 9:57 PM
    Edited by: user11204334 on Dec 5, 2010 9:58 PM

    Hi,
    One observation, Apex is switching the Session ID after one got killed ? I was working on Apex page with browse Item to test open cursor count,
    after killing the SID (227) on which the open cursor count was getting increase, it APEX automatically switches to new SID(149) for that session.
    Now the problem is even if I have two SID's and one hits the maximum open cursor count, It is not switching to other SID instead the whole application becomes unavailable.
    STATNAME SID VALUE USER
    opened cursors current 20 14 APEX_PUBLIC_USER
    opened cursors current 149 74 APEX_PUBLIC_USER
    opened cursors current 194 71 APEX_PUBLIC_USER
    opened cursors current 211 5 APEX_PUBLIC_USER
    opened cursors current 227 325 APEX_PUBLIC_USER Killed
    opened cursors current 244 15 APEX_PUBLIC_USER
    opened cursors current 20 14 APEX_PUBLIC_USER
    opened cursors current 149 76 APEX_PUBLIC_USER
    opened cursors current 194 71 APEX_PUBLIC_USER
    opened cursors current 211 5 APEX_PUBLIC_USER
    opened cursors current 244 15 APEX_PUBLIC_USER
    Please kindly help in this.
    Thanks in Advance
    Thanks & Regards
    Sanjay
    Edited by: user11204334 on Dec 8, 2010 1:02 AM

  • IPad/iPhone file browser (iPhone Explorer) no longer working after iTunes update

    iTunes freezes up on me a lot when I connect my iPad, so I prefer to add files to apps using a file browser like iPhone Explorer. However, after this most recent iTunes/Quicktime update, this and other programs like it don't work.
    My computer is running Windows XP (yeah, I know it's old, but I'm not made of money!). I have an iPad 2 with the most recent iOS version installed.
    Here's the error message iPhone Explorer gives me:
    "iPhone Explorer is unable to load the app directories because the version of CoreFoundation.dll installed on your system doesn't work properly. This sucky DLL likely got on to your computer because of a recent update in the Safari web browser. Because this sucky DLL is shared between many other Apple programs, reverting back to the non-sucky version is more complicated than just uninstalling and reinstalling a couple programs. We recommend waiting a couple months for the next Safari update and hopefully Apple will have this stuff fixed then."
    I don't have Safari installed on my computer. Just iTunes (and Quicktime).
    As a result, you can't browse the app directories, so you can't add any files to apps. I tried uninstalling iTunes and replacing it with an older version, but it wouldn't open because it said the library file was created by a "newer version." I'm also having some trouble even getting iTunes to show the files in my apps (under iPad -> Apps -> scroll to bottom of the screen), but that might just be a symptom of my old iTunes-freezing problems.
    I'm kind of stuck. Anyone else experience this problem or have any suggestions? Thanks!!

    That's XP SP3 I hope?   iPhone Explorer support is shown at the bottom of the page you linked above or at [email protected] and it's them you should be asking really.
    You should be keeping iTunes and the iPad software always up to date for security reasons.   If that breaks external software then they are the ones to ask.
    If you are having problems with the iPad then try resetting it by clicking the Home and Sleep buttons simultaneously for about 10 seconds until the Apple logo appears.  You wont lose anything.
    If iTunes is acting up then try asking on that forum:  https://discussions.apple.com/community/itunes/itunes_for_windows

  • Dynamic action on File browse change event

    Hi Experts,
    apex version 4.1
    This is what i'm trying to do..
    i have a file browse control and a text field. when user selects a file, selected fiel's name (without file type extension) should be set to text field.
    I tried adding a dynamic action to file browse control's change event and within pl/sql Set Value logic i queried the wwv_flow_files and tried to return the file name it didn't work. i got no data found error. i assumed file is being inserted into wwv_flow_files when a page submission happens.
    In my second approach within the SetValue pl/sql logic i got the file browser control's (by directly accessing field, not by querying wwv_flow_files)value and did some string manipulation and tried to return only the file name. yet i got the same no data found error.
    Any idea how can i implement this ?
    Thanks in advance.
    - kurubaran

    Hi,
    I think PL/SQL approach will not work before you submit data to database.
    Have you think use $v function to get value from file browser?
    http://docs.oracle.com/cd/E23903_01/doc/doc.41/e21676/javascript_api.htm#BGBGDGIH
    Regards,
    Jari
    My Blog: http://dbswh.webhop.net/dbswh/f?p=BLOG:HOME:0
    Twitter: http://www.twitter.com/jariolai

  • How to populate DB column with filename from file browse item?

    Hi,
    Using APEX 3.1.2, I'm trying to easily allow maintenance of a filename stored in a DB column (VARCHAR2(1000)). Using the column as a file browse item seemed to be the way to go, but of course I don't want the resulting file to be uploaded and it appears as though an existing filename is not shown in a form when the row is retrieved.
    After much searching, I found Checking filename length in File Browse item before uploading , but I'm not able to connect the dots. I was thinking that I could create a hidden file browse item and use a button to call Javascript function to activate it, then save the resulting filename to my DB column item and wipe out the hidden item before it was uploaded. But the hidden item doesn't appear, so I'm not able to reference it's form input name.
    Hopefully this mess makes sense. Anyone?
    Thanks!
    Rich
    Edited by: socpres on Sep 5, 2008 2:02 PM because message was truncated after attempting to preview it first.

    Hi John,
    From what I can tell, the path of a local file browsed from a file browse item cannot be retrieved because of security concerns. Although, it seems that while Firefox 3 only returns the filename sans directory, IE6 returns the full path:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="ltr">
    <head><title>Form Test</title>
    </head><body>
    <script type="text/javascript" language="JavaScript">
    function GetDirectory()
    strFile = document.FileForm.filename.value;
    intPos = strFile.lastIndexOf("\\");
    strDirectory = strFile.substring(0, intPos);
    alert(strDirectory);
    document.FileForm.Directory.value = strDirectory;
    </script>
    <form id="FileForm" name="FileForm">
    <input type="file" id="filename" name="filename" value="" onChange="GetDirectory(this.value)">
    <input type="hidden" id="Directory" name="Directory" value="">
    </form>
    </body>
    </html>
    This Win-specific code displays the path via IE6, but not in Firefox 3. Then again, I can't seem to preview posts here using FF3, either...
    Rich

  • File browse : How to keep the file path in the file browse field?

    Hello,
    I have
    1) file browse field called P2_FILE_PATH.
    2) a select list with submit : P2_REGION
    If i upload some file d:\abc.gif , then select some region in the P2_REGION,
    P2_FILE_PATH will become empty. But in the session, i can find the blob value. but not the "d:\abc.gif "
    Using the following script I could capture the value of P2_FILE_PATH in a field
    P2_TEST.
    onload="javascript:document.getElementById(P2_FILE_PATH').value = document.getElementById('P2_TEST').value;"
    P2_TEST contains d:\abc.gif .
    How to retain the file path, though some other field is selected and submitted?
    Thanks in advance.
    Regards,
    Archana

    Hello Archana,
    You can't do what you want because of some HTML security restrictions – nothing to do with APEX. As you found out, You can capture the value of this item. You can't set it. After submitting the page, the browser is the one to clear the item.
    The only workaround is to work with AJAX and not submit the page until the end of the user input phase.
    Regards,
    Arie.

Maybe you are looking for

  • How do i connect to a database in ssxa(site studio external application)

    Hi, I'm working with jdev11g 11.1.1.6, and im using oracle UCM 11g R1 server, i installed the ssxa patch to my jdev... im new to it could somebody helps me to connect to he data base from my application... Its very important in my project..

  • ZDM Agent "Invalid Drive Path"

    We use Zenworks to install software and use the Zenworks folders to display the program shortcut icon. After installed, it will launch (Run options tab > Application > Path to file) and the program will start. I'm having an issue for the last couple

  • My efforts to download CS6 all fail because I cannot locate the download manager button

    This is a download purchased through Techsoup.org

  • C3-00 opera error using wi-fi

    After posting over opera forums, still no one can help me.. wondering if any one here can help me.. I've bought the cell brand new a week ago. WAs using phone without sim card and opera work ok.. now i've inserted the sim card, and opera won't work a

  • Cs4 template locks after comments entered

    In a CS4 template, I want to leave the page title (<title>...</title>) editable.  By adding comments before and after the "title" this can be achieved.  However, as soon as I enter the exclamation point (!) at the beginning of the comments above and/