File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Linux / UNIX and the fly likes Root drive in Unix corresponding to C:/ in Windows Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Engineering » Linux / UNIX
Bookmark "Root drive in Unix corresponding to C:/ in Windows" Watch "Root drive in Unix corresponding to C:/ in Windows" New topic
Author

Root drive in Unix corresponding to C:/ in Windows

Jignesh Gohel
Ranch Hand

Joined: Dec 28, 2004
Posts: 276
Hi,

In my application i am generating some files & creating the zip of them using the Zipping API of java.I am saving that files at the path like this:

/folderName(Nothing preceding the '/' since the directory also gets created on the fly if it doesn't exists)

I am using windows machine(XP professional OS)AND i have Apache web server as my development enviroment.So in this case the directory gets created in C:/ that is in the drive where my web server is installed.

So my file after generating is at the following path C:/folderName

Now on my deployment environment there is UNIX OS and weblogic server .So in UNIX where the directory will get created.I don't know where the webserver is usually installed on the UNIX server.
[ June 17, 2006: Message edited by: Jignesh Gohel ]

Regards,
Jignesh

The Art Of Life Is To Know When To Be Useless And When To Be Useful - CHUANG TZU
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16305
    
  21

I don't think that the Windows drive ID gets stored in the ZIPFile - only directory paths. Normally, when you unzip something, everything will be unzipped relatived to the current working directory, unless you specify otherwise.

Apache is most often found in /usr/local/apache on Unix systems, but other arrangements also are common. For Red Hat Linux, there is no "apache" directory, as its components are distributed into LSB-compatible parts of the filesystem: /usr/bin for the executables, /etc/httpd for the config, /var/log/httpd for the logfiles and /var/www for the web content. Don't be surprised if you find things a little different, though - I'm quoting that from memory.


Customer surveys are for companies who didn't pay proper attention to begin with.
Jignesh Gohel
Ranch Hand

Joined: Dec 28, 2004
Posts: 276
Hi Tim,

Thnaks for the reply.

I don't think that the Windows drive ID gets stored in the ZIPFile - only directory paths.


No no i didn't mean that the windows drive id gets stored in the ZIP file.

What i want to know is i have web application .Its directory structure is as that of a usual apache web server application.Now my tomcat is installed in C:\Program File\Apache Group\Tomcat 4.1\webapps\myapp\...

So in the classes folder i have a properties file in which i have mentioned the path- for the file which would get autogenerated- as key:value pair (e.g filePath = /GeneratedZipFiles) And i am getting this filePath value in one of my class .Now when i am running the application the directory "GeneratedZipFiles" gets created in the C:/.

So that is the thing on my development enviroment.

Now on deployment enviroment i have Weblogic6.1 server & unix is the Operating System.The weblogic is installed at the following path:

/usr6/weblogic6.1/wlserver6.1/config/myAppPath......

So i would like to know when my application is deployed at the above mentioned path in UNIX OS where the "GeneratedZipFiles" directory would get created, like it got created in Windows in C:/.
Martin Simons
Ranch Hand

Joined: Mar 02, 2006
Posts: 196
In unix '/' is the root directory. So, simply remove 'C:' from your
path, and that is where the files are. So it would be /GeneratedZipFiles.
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24187
    
  34

Originally posted by Martin Simons:
In unix '/' is the root directory. So, simply remove 'C:' from your
path, and that is where the files are. So it would be /GeneratedZipFiles.


Indeed. Except you likely won't have permission to write files there.


[Jess in Action][AskingGoodQuestions]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Root drive in Unix corresponding to C:/ in Windows