Extracting Directory Structure of System

Please someone let me know that how can i extract the Directory Structure of the system (on which the application is running) in Java.
and then how can i display it in the Jtree .
The requirement is just like that of Windows Explorer.
In the Explorer we can see the complete directory structure of the system on left hand side.
Your help would be highly appreciated.
thanks in advance
Sakshi

This might be a starting point...
http://developer.java.sun.com/developer/TechTips/1998/tt1117.html#tip2

Similar Messages

  • Extracting Directory Structure of System in Java

    Please someone let me know that how can i extract the Directory Structure of the system (on which the application is running) in Java.
    and then how can i display it in the Jtree .
    The requirement is just like that of Windows Explorer.
    In the Explorer we can see the complete directory structure of the system on left hand side.
    Your help would be highly appreciated.
    thanks in advance
    Sakshi

    Here's one place...
    http://forum.java.sun.com/thread.jsp?forum=31&thread=441169
    Regards,
      /Håkan

  • Display of directory structure of remote system in GUI

    Hi All,
    I have the following requirement and request for your suggestion.
    I have two systems namely, A & B, on each of which a separate java program is running. And, these two programs are communicating to each other through RMI.
    The requirement is that, I have to show a GUI that displays the directory structure of system B from with in the program running on A.
    If any one has a solution for this, request you to please advice me on this.
    Looking forward for your help as early as possible.
    Regards
    Sekhar

    Thanks for your reply Ronillo.
    But, my requirement is like this.
    If you can spare few min. of your time, I will
    explain you my exact requirement.
    A & B are two systems conected in network.
    A & B are running programs (java) and program in A
    will make request to program in B thru. RMI.
    Now, one of these requests are... For transfering
    files on system B to system A.
    User working on A will make request for transfer of
    few files from System B to A.
    When he/she makes such request from System A, then a
    GUI (open file dialog box) shall get displayed on
    system A showing the directory contents of System B
    so that user can make selection of file(s) (that
    belong to System B) for file transfer.
    So for this, I need the "remote file chooser" kind of
    functionality.
    We are using java RMI for this.
    Your suggestions are most welcome on the possible
    implementation of this.
    Regards
    Naga SekharIm sorry for my late reply, Im busy with my thesis project. I dont know if what I think is right but, here please study the following:
    Just to list a few...
    01.) javax.swing.filechooser.FileFilter.
    02.) javax.swing.filechooser.FileView.
    03.) javax.swing.filechooser.FileSystemView.
    04.) java.net.URL.
    04.) java.net.URLConnection.
    05.) java.io.BufferedInputStream.
    06.) java.io.BufferedOutputStream.
    07.) java.io.FileInputStream.
    08.) java.io.FileOutputStream.
    09.) java.io.BufferedReader.
    10.) java.io.BufferedWriter.
    11.) Java Native Interface.
    You may create a custom file system view that you can pass to the constructor of file chooser. Google and read tutorials for more info.
    Okay? ^_^ God bless you all.
    Thank you -Ronillo

  • Creation of oracle directory structure on mounted file system in linux

    Hi,
    I need to use datapump utility for which directory structure would be required. since my dump files are stored another system i usually mount the file system, can i create oracle directory structure on mounted filesystem in linux? do suggest urgently. thanks in advance.

    Yes you can why not

  • Change Directory Structure Created in MPZIP file

    I'm trying to standardize my Multisim projects for inclusion in our documentation control system. As I build my project, I have a directory structure that I'm using. When I include the files in the project, the directory structure is remembered in the MPZIP file. However, the default is to unpack all files into the External(Project Name) folder. Following the help, 
    Extracted Path—The location to which the files will be extracted. The default is <project name>External\filename, for example project1External\amplifier.ms12. Use the drop-down lists in the Extracted Path column to select other locations as desired. 
    I can go in and change the directory path of each file using pull-down boxes. This makes  a manual process and if I include datasheets, specifications, and dxf files, is quite time intensive. Is there a way to default to having the project to unpack to the old directory structure? Is there some other way to automate the unpacking? I can manually zip the old project structure, but other than the form of the directories, the MPZIP is so convenient.
    Solved!
    Go to Solution.

    Hi Doug,
    When you unpack the project, the default is to create a new folder and put everything together since it is unlikely that the new computer will have the same file structure as the computer where this project came from.  If you want Multisim to create the same file structure as the original, you can click in the cell under "extracted path" and select the old path, if the folder doesn't exist, Multisim will create one.  Unfortunately, you will have to do this for each item on the table.
    Tien P.
    National Instruments
    Attachments:
    unpack.png ‏17 KB

  • Import statement and directory structure

    First of all, sorry for such a long post, I believe part of it is because I am unsure of the concept of importing in Java. Secondly, Thanks to anyone who can ultimately enlighten me to the concept of import. I did ask this question before in the "erorr and error handling" forum, and the people who have helped me there did a great job. But, I believe I require a little more clarification and thus have decided to post here.
    Anyhow, my question..
    Could someone explain to me the concept of the import statement, or direct me to a webpage with sort of explanation for newbies? For some reason, I am having a hard time grasping the concept.
    As I understand it, the import statement in Java, is very similar to the namespace keyword in C. That is to say, import doesn't actually "import" any source code, the way that the #include statement does in C.
    So I suppose what my question is, say I have a java class file like below:
    //filename: sentence.java
    //located: c:\school\csc365
    package csc365;
    class sentence
    //some variables here..
    //some constructor here..
    //some methods here..
    And some sample program like the one below which implements the above..
    //filename: test.java
    //located: c:\school\csc365
    import csc365.*;
    import java.io.*;
    class test.java
    //creates some sentence object
    //uses the object's methods
    //some other things.
    As I understand it, the test.java file should not compile because the csc365 package is not in the correct directory. (assuming of course, the classpath is like c:\school\csc365;c:\school )
    But, ... where then should the sentence.java be located? In a subdirectory of c:\school called csc365 (i.e c:\school\csc365\) ?
    And thus that would mean the test.java file could be located anywhere on the hard drive?
    I suppose, I just need a little clarification on the correlation between a package's "name" (i.e package csc365; ) and its corresponding directory's name, and also how the javac compiler searches the classpath for java classes.
    ..So, theoretically if I were to set the classpath to look in every conceivable directory(provided the directory names were all unique) of the harddrive, then I could compile a test.java anywhere?
    As a note: I have been able to get the test.java file to compile, by leaving out the import statement in the test.java file, and also leaving out the package statement for the sentence class, but I assume this is because the files are defaulted to the same package?

    Hi Mary,
    No, import isn't analogous to C++ namespace - Java package is closer to the namespace mark.
    import is just a convenience for the programmer. You can go your whole Java career without ever writing an import statement if you wish. All that means is that you'll have to type out the fully-resolved class name every time you want to use a class that's in a package other than java.lang. Example:
    // NOTE: No import statements
    public class Family
       // NOTE: fully-resolved class names
       private java.util.List children = new java.util.ArrayList();
    }If you use the import statement, you can save yourself from typing:
    import java.util.ArrayList;
    import java.util.List;
    public class Family
       // NOTE: fully-resolved class names
       private List children = new ArrayList();
    }import isn't the same as class loader. It does not bring in any source code at all.
    import comes into play when you're compiling or running your code. Java will check to make sure that any "shorthand" class names you give it live in one of the packages you've imported. If it can't find a matching fully-resolved class name, it'll give you a message like "Symbol not found" or something like that.
    I arrange Java source in a directory structure that matches the package structure in the .class files.
    If I've got a Java source file like this:
    package foo.bar;
    public class Baz
       public static void main(String [] args)
            Baz baz = new Baz();
            System.out.println(baz);
       public String toString()
           return "I am a Baz";
    }I'll store it in a directory structure like this:
    root
    +---classes
    +---src
          +---foo
               +---bar
                    +---Baz.javaWhen I compile, I go to root and compile by typing this:
    javac -d classes foo/bar/*.javaI can run the code from root by typing:
    java -classpath classes foo.bar.BazI hope this wasn't patronizing or beneath you. I don't mean to be insulting. - MOD

  • How to create a tree based on directory structure

    I want to create a hierarchical tree in Forms 6i based upon a file system directory structure (similar to Windows Explorer). How can I populate a tree with this information, is there something that I can call or write that would return the file system structure in a format that I can populate my tree?
    Any advice would be greatly appreciated.
    Thanks
    Richard

    Your link does not seem to work.They're re-jigging all the links to accomodate the hot poop on Oracle's latest and greatest, 10G. So at least the website is on schedule even if the actual software delivery dates have slipped :P
    We can still get D2KWUTIL from here: http://te chnet.oracle.com/software/products/forms/content.html
    Cheers, APC

  • Creating a Standby Database with the Same Directory Structure

    Hello gurus,
    I am self-learning the feature Oracle Data Guard, so I am testing it on Oracle 10g R2.
    At Oracle documentation there is a section F.4.: Creating a Standby Database with the Same Directory Structure*, that explains how to create a standby database with RMAN but there is something that I don´t understand:
    In the standby server, I created a database with the SID equal to production database* with the objetive to have the same directory structure, but when I try to startup nomount the standby database with pfile appear this expected error:
    ORA-16187: LOG_ARCHIVE_CONFIG contains duplicate, conflicting or invalid attributes
    So my question is: Is possible have the Same Directory Structure on both: Production and StandBy server?
    Thanks in advanced.

    Uwe and mseberg: thanks for your quick answers
    I have a doubt: How can you have the same directory structure if you have differents SIDs?, for example if you follow the OFA suggestions you would must have:
    On Production server: */u01/app/oracle/oradata/PRIMARY/system.dbf*
    On StandBy server: */u01/app/oracle/oradata/STANDBY/system.dbf*
    Or you created the directory structure manually on StandBy server? For example replacing the string STANDBY* to PRIMARY* before create the database using dbca.
    Do you understand my doubt? Excuse me for my english.
    Thanks.

  • Directory structure for  ABAP+JAVA Dialog Instance

    Hello,
    Can any one clarify how will be the directory structure in a case where we have ABAP+Java System?
    For Central Instance,DVEBMGS<instance no>
    Central Services,SCS<instance no+1>
    Ex:DVEBMGS20
    SCS21
    If I have another dialog instance,can I have only ABAP or only Java in that?What will be the directory structure?But I read that they will be in 1:1 ratio
    Will it be D22(Only ABAP) or J22(Java only).
    As a dialog instance,can ABAP exist with out JAVA.
    or can JAVA exist without ABAP
    Please explain the directory structure with an example.
    Thanks,
    Sudheer.

    Sudheer,
    http://www.redbooks.ibm.com/redpapers/pdfs/redp4200.pdf page No 24 should help you...

  • Directory Structure Errors

    In TechTools ( came with Applecare ) i got a failed on Directory Structure, second time since owning my couple month old machine, first time apple recomended reloading.
    i dont mishandle it, dont bump, dent, etc, the laptop.
    but all of a sudden sometimes my USB keyboard/mouse wont register as being plugged in all the time / techtools HDD errors.
    only recent think if done is instal Onyx to look over the logs, and little while after ( days ) the issues started hapening,, same with last time, but didnt think it was Onyx, now im starting to wonder, anybody else have any issues like this, and Would Onyx couse it ( doubt it, but since onyx goes deep into the system, no idea )

    It is an interesting coincidence that I came across this thread today because I had the exact same issue myself last night.
    I have plenty of space available on my HDD 73.1GB.
    I downloaded the latest Onyx last night and when it starts it checks the disk. I got an error on the startup volume so I ran Tech Tools as well.
    TechTools came up with that same failed Directory Structure error.
    I next tried to reboot the comptuer holding down Apple/S and entering fsck -fy
    That resulted in errors. Tried re-running it 3-4 tims to see if it would resolve anything but got the same error with every attempt.
    I then booted from DiskWarrior and ran that. It seemed to correct a number of issues and now TechTools, Onyx, Disk Utility etc. find no problems. But it was kind of an odd occurance and interesting to find I was not alone in getting that last night.
    The odd thing though is that I also checked my Mac Pro while I was wating on this one to finish and had directory errors on that one as well so had to run DiskWarrior on both.
    I was kind of concerned about that to say the least.

  • Directory structure after upgrade to iPhoto 6

    After upgrading to iPhoto 6, it appears that my photos were copied from the old, date-based structure into a new directory structure, but the old structure was left behind.
    What is the layout of the new structure, and can the remaining old structure be discarded at this point?
    Thanks for any insight you might be able to offer...

    The new structure organizes photos into Originals and Modified folders. There is a third folder called Data that contains thumbnails created for the photos (smaller pictures used for better performance). These three are essential for iPhoto 6 to work.
    Each folder contains a folder for each year (a year folder is created if you have even one photo from that year, e.g. a photo from 4/3/2004 will create a folder called "2004" and any other photos from that year will then be placed within it.
    Every import creates a serially numbered Roll folder within the year folder. So if you import photos including IMG_234.jpg from 4/3/2004, for example, the location of IMG_234.jpg will be:
    iPhoto Library/Originals/2004/Roll 1/IMG_234.jpg
    And Roll 1 will have other photos imported in the same session. If you modify the photo within iPhoto (enhance, retouch, etc), the modified copy will exist in:
    iPhoto Library/Modified/2004/Roll 1/IMG_234.jpg
    The Data folder will contain a thumbnail for the image in the same path as the Originals:
    iPhoto Library/Data/2004/Roll 1/IMG_234.jpg
    So inside the iPhoto Library folder, you will see some files and those three folders with their sub-structure folders. Other things within the top level of the iPhoto Library folder, are leftovers from the previous structure - such as a folder called "2004" or "2005" that ISN'T inside Originals, Data, or Modified folders.
    PhillyPhan's advice is sage. Don't mess with the insides of the iPhoto Library. However, I did verify on my own system after I upgraded, that year folders at the top level of the iPhoto Library are from previous versions of iPhoto. So you could move those, and those only, to a separate folder on your HD. I moved those off to a DVD-ROM and haven't seen problems since.
    Remember: Don't touch any files, and don't touch anything within Data, Originals, and Modified folders.

  • Directory structure and files in Oracle Application server 10g and 11g

    Hi all,
    I am doing a lab migration from 10g to 11g based on the use of JAXB. There were some directory structures used in 10g to store the JAXB jar files and some other custom jar files. I want to know the equivalent folder structures in SOA 11g server. The 10g server directories are mentioned below:-
    1.<OracleAS_Home>\webservices\lib.
    2. server.xml located at <OracleAS_Home>\j2ee\home\config in 10g. Where can I find the equivalent file to "server.xml" in 11g server?
    3. <OracleAS_Home>\bpel\system\classes\com\oracle\bpel\xml\util.
    4. <OracleAS_Home> \bpel\system\classes.

    Here are the equivalents as per best of my knowledge:
    1. <WebLogic Home>\server\lib
    For example, D:\Middleware\wls1036\wlserver_10.3\server\lib
    2. config,xml located at <Domain_Home>\config\
    For example, D:\Middleware\wls1036\user_projects\domains\ArunBaseDomain1036\config\config.xml
    3. It should be the same as 10g (instead of OracleAS_Home, it will be ORACLE_Home) if you install the BPEL product. Since, I have not installed BPEL/SOA, I am not very sure.
    4. It should be the same as 10g (instead of OracleAS_Home, it will be ORACLE_Home) if you installed the BPEL product.
    Also, I would recommend that you consider using ORACLE Smart Upgrade (JDeveloper component) to help you with the upgrade process. It exactly points out these mappings of file/directory structures AND the necessary configuration changes as well.
    If you are requirement, is only about making the library jars available to your application, then consider reading the below discussion.
    Re: XIncludeAwareParserConfiguration cannot be cast to XMLParserConfiguration
    Arun

  • Changing file name and directory structure for use outside of iPhoto

    Hi,
    I was wondering if its possible to get iPhoto to name the files from my library to reflect the names that I've given the files in iPhoto. I'm thinking along the lines of iTunes, where its possible to chose in the preferences how the files are named, and there is some logical directory structure, such as "Artist/Album/01 - Track 1.mp3". These file names are updated to reflect any changes made in iTunes.
    I've heard the argument that I shouldn't ever want to do anything with the files themselves because iPhoto can do everything I would ever want to do, but I want to organize the files so that not all of my organizational work is lost if I decide to stop using iPhoto and transition to a different system. Any suggestions would be appreciated.
    Thanks,
    Adrian

    Adrian
    No it's not possible.
    You can rename the files before bringing them into iPhoto, you can rename them with the titles on Export (Use the File -> Export command, it gives you the option to use the title and filename) but when it's inside iPhoto you cannot rename the files.
    However, all is not entirely lost. Using Film Rolls (View -> Film Rolls) you can move pics between rolls, name rolls, create rolls and so on, as long as you do this in the iPhoto Window, and these changes will be reflected in the iPhoto Library Folder.
    If at some point you decide to chuck iPhoto then (if the new app won't read iPhoto database files) you can simply export each album you've created to a Folder (using the File -> Export command as I suggest above), this, along with exporting slideshows will preserve your organisational efforts.
    The iTunes database has a rather simple job to do: track a file and it's assorted metadata. iPhoto, on the other hand, tracks a file and it's assorted metadata, plus a Modified version, plus a thumbnail. If you consider what happens when you edit a pic, for instance - Copy Original, perform edit, save modified version, remove Original Thumbnail and then create new one - you can see it's a rather more complex job.
    Finally, the standard warning: It is strongly advised that you do not move, change or in anyway alter things in the iPhoto Library Folder as this can cause the application to fail and even lead to data loss. Any changes you make must be made in the iPhoto Window.
    Need more info? by all means post again.
    Regards
    TD

  • Directory structure on Win/MSS

    Hello,
    It is a conceptual doubt, not an error.
    We have several Dialog instances (on separate boxes) for our Production system running R/3 4.7 on Win server 2003 + MS SQL 8.00.2040
    I noticed that directory structure of Dialog hosts don't have SYS directory under D:\usr\sap\<SID>.
    Hence the profile directory \usr\sap\<SID>\SYS\profile is only present in Central instance host. It doesn't seem to be mounted on any Dialog instance host.
    Q: How does any Dialog instance, in this case, reads the Start & Instance profiles during startup?
    - Roshan

    Hi Sekhar,
    What you say is correct.
    My question is specific to Windows OS, where I am not able to see (on DI's) any sapmnt or any mapping to the global share.
    There must definitely be some mapping but somehow its not visible.
    E.g.
    In a DI host running on UNIX you can view directory structure like below, which clearly shows SYS dir
    [user@host ~]$ cd /usr/sap/PD1/
    [user@host PD1]$ ll
    total 28
    drwxr-xr-x 8 pd1adm sapsys  4096 Oct 13 08:29 D03
    drwx------ 2 root   root   16384 Oct  8 16:30 lost+found
    drwxrwx--- 4 pd1adm sapsys  4096 Nov  3 04:33 out
    drwxr-xr-x 5 pd1adm sapsys  4096 Oct 13 08:26 SYS
    But windows doesn't show the SYS dir. by default. Why?
    By which method/route is sapmnt being accessed in Windows environment?
    >
    > may be you can refer below URL for more informative.
    >
    > http://help.sap.com/saphelp_nwmobile71/helpdata/en/0a/0a2e36ef6211d3a6510000e835363f/content.htm
    > http://help.sap.com/SAPHELP_NW70EHP1/helpdata/EN/20/f8e36764b1e049beee648a987e4315/content.htm
    PS: please check below link for a detailed directory structure of SAP running on Unix -
    http://bit.ly/4TqUTQ
    BR,
    Roshan

  • Read a directory structure?

    Hallo every body,
    How can I read the directory structure of a system(any tutorial or hint).
    Thanks in advance

    The File object has all the methods you need to do this manually. What problem are you trying to solve?

Maybe you are looking for