aspose file tools*
The moose likes Cattle Drive and the fly likes Path stuff.......... Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » This Site » Cattle Drive
Bookmark "Path stuff.........." Watch "Path stuff.........." New topic
Author

Path stuff..........

Carol Murphy
village idiot
Bartender

Joined: Mar 15, 2001
Posts: 1195
It's path stuff, again. I'm looking over the instructions for Servlets 4b, and it mentions that certain files are to be put in com.javaranch.drive.videos, so I try to extract one of them using WinZip to the appropriate file, and I end up with a duplication in the file structure. I guess when the files were zipped, their location was specified so that when they got unzipped the directory structure would be created automatically. So I think I have them in the right spot.
Now, there is another class called PathFinder, that deals with finding the absolute path rather than the relative path. After reading through it a few times, I just don't follow. Is there some tutorial that anyone knows of that can help me get past this block I have when it comes to understanding paths and the notation used to specify them? What frustrates me is that I just know this stuff is simple, but I can't seem to grasp it.

I'm quoting from the documentation in PathFinder.java:

The JSP's are at the root of the com tree.

There is a clue in there somewhere, but I can't find the com tree. I don't even know what kind of leaves a com tree has!

Marilyn de Queiroz
Sheriff

Joined: Jul 22, 2000
Posts: 9046
    
  10
Originally posted by Carol Murphy:
It's path stuff, again. I'm looking over the instructions for Servlets 4b, and it mentions that certain files are to be put in com.javaranch.drive.videos, so I try to extract one of them using WinZip to the appropriate file, and I end up with a duplication in the file structure. I guess when the files were zipped, their location was specified so that when they got unzipped the directory structure would be created automatically.


When you open the zip file in WinZip, look in the right-hand column for the path it will be unzipped to. In other words, if you see com/javaranch/ next to a file named "file.txt" and you unzip it to C:\java, you'll end up with C:\java\com\javaranch\file.txt


JavaBeginnersFaq
"Yesterday is history, tomorrow is a mystery, and today is a gift; that's why they call it the present." Eleanor Roosevelt
Marilyn de Queiroz
Sheriff

Joined: Jul 22, 2000
Posts: 9046
    
  10
Originally posted by Carol Murphy:
Now, there is another class called PathFinder, that deals with finding the absolute path rather than the relative path. After reading through it a few times, I just don't follow. Is there some tutorial that anyone knows of that can help me get past this block I have when it comes to understanding paths and the notation used to specify them? What frustrates me is that I just know this stuff is simple, but I can't seem to grasp it.

I'm quoting from the documentation in PathFinder.java:

The JSP's are at the root of the com tree.

There is a clue in there somewhere, but I can't find the com tree. I don't even know what kind of leaves a com tree has!


"the root of the com tree" means the directory where com/myCompany/... lives. The files are the leaves.
[ March 19, 2006: Message edited by: Marilyn de Queiroz ]
Marilyn de Queiroz
Sheriff

Joined: Jul 22, 2000
Posts: 9046
    
  10
Using Google I found these.
http://www.webdiner.com/webadv/begin/paths.htm
http://www.ibdhost.com/help/path/
http://zone.ni.com/devzone/conceptd.nsf/webmain/87EBC63F845C086786256890007EC8B8
http://www.linux-tutorial.info/modules.php?name=Glossary&term=relative%20path
http://www.communitymx.com/content/article.cfm?cid=AEDCC52C4AD230AD
http://www.ozoneasylum.com/5737
http://www.roseindia.net/javajdktutorials/c10/s2.shtml (about half way down)
http://www.gailer-net.de/tutorials/java/Notes/appendixA/htmlPart2_9.html

I'd be interested to know whether you found any/all of these helpful. I mostly learned through reading the API and trial and error.

One problem is that when you're talking about a web app, it's somewhat different than talking about a command line app. In the command line application, your root is probably C:\

In a web app, the root is relative to where the web application lives in the server.
Carol Murphy
village idiot
Bartender

Joined: Mar 15, 2001
Posts: 1195
Thanks for the links Marilyn! I'm half way through the first one, and now I know what ../ means. ( I never had to learn any DOS, so a lot of this stuff is new to me. ) I think this is exactly what I needed.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Path stuff..........