root « directory « Java I/O Q&A





1. Getting the default root directory in Java    stackoverflow.com

I'm making a basic file browser, and want to know how to get the default root directory. I know that java.io.File.listRoots() gives all the roots (for me it's A:\, C:\, D:\, ...

2. Importing a Java Package in root directory    stackoverflow.com

I am in a sub domain subdomain.site.com and there is a java package higher up in the root directory at /usr/share/sphinx/api/java. The typical thing to do to import this package would ...

3. display all the files and the directory of the each file under a root folder recursively    stackoverflow.com

i want to display all the files and the directory of each file under a root directory recursively the output should look like this filename ---> the directory which contains that file ...

4. How to create directory in root of client machine?    coderanch.com

My applet creates a directory on the client's machine to store persistent user data. I'm using: File dir = new File("applet_user_data"); dir.mkdir(); ...but with Win XP, this creates the directory on the users desktop! I would prefer to make the dir within the users root directory. Does anyone know what code will achieve this regardless of the client system? Thanks, James ...

5. Searching a given file name strating from a given root directory    coderanch.com

Hi All, I would like get some hint on above. Say, I want to search for a file "test.exe". I want to write a method that returns the exact path of the file if the given file name exist. I can pass the file name and the root directory as the parameters to this method. May be this is a silly ...

6. Accessing JDK1.3.1 folder from the DOS root directory    coderanch.com

Hi Frank, The 'try' didn't work...but thanks for helping.. After much research, I have figured out the reason. I upgraded my Win 98 recently to XP recently. In my previous WIn 98 desktop, I have a MS-DOS Prompt shortcut, so, when upgraded the OS, this short-cut remains on the XP desktop. From my research, Win 98 uses Command.com while XP uses ...

7. create a file in the root directory    coderanch.com

Hi, based on some user action I need to create a file on the server inside the project's root directory. The url of my application is : http://localhost:8080/Desk/Desk.html. The name of the file is DeskItems.xml. I tried to get the application Context path and appended that to the file name by using : getServletContext.getPath("/") + "/DeskItems.xml"; But this approach is not ...

8. file searching with file name in a specific root directory    coderanch.com

Campbell Ritchie wrote:Eclipse is not a runtime, but a development environment. It uses the standard Java API, and any other API you need to download and add to your classpath. When you have finished developing, it should work by [double-]clicking the resultant .jar. Use the same API you would use without Eclipse. Ritchie., I'm in mid of developing plug-in which fits ...

9. Outputting both files and directories of a specified root directory and sub    forums.oracle.com

This looks strangely familiar to Coursework set by Cardiff School of Computer Science. This isn't my idea of help at all. I would suggest to stop posting, otherwise you may face disciplinary action. If you are not a student of Cardiff University, please disregard this message. Elaine Slater Head of Cardiff School of Computer Science





10. Find the root directory    forums.oracle.com

11. Save file to ROOT directory not bin directory    forums.oracle.com

Thanks for the replies. I can point to my local drive (i.e. C:\Stock) and it will store the file. What I would like to do, but I missed adding in my original post (sorry) would be to detect the root directory when the class has been uploaded to a remote server, so that no matter where the class is run from, ...

12. access file on root directory    forums.oracle.com

thanks Kayaman. Yes my icon is under the web application home. It is the external files that I need to access. Total size of all of them is about 1 terabyte. So I can not possible put that under my WEB-INF directory. I need to point to the main G drive. Can you provide any further assistance? Thank you!

13. Getting the root directory with java    forums.oracle.com

Hi , This will work it out .Try this import java.io.*; public class FindRoot { public static void main(String[] args) { File f = new File("c:/raja/a.out"); String child=""; String root = ""; if (f.exists()) { child = f.getParent(); root=child; while (child != null && child.indexOf(" ") > 0) { ; f = new File(child); if (f.exists()) { child = f.getParent(); if(child!=null ...