File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes absolutepath and canonical path Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "absolutepath and canonical path" Watch "absolutepath and canonical path" New topic

absolutepath and canonical path

Milind Deodhar
Ranch Hand

Joined: Dec 06, 2000
Posts: 32
Can somebody explain me the correct output the methods
getAbsolutepath and getCanonicalPath will give with a example?
Suppose the file resides in dir c:\java
I am totally confused with this topic.
[This message has been edited by Milind Deodhar (edited December 06, 2000).]
bill bozeman
Ranch Hand

Joined: Jun 30, 2000
Posts: 1070
getAbsolutePath and getCanonicalPath are similar. RHE says that getCononicalPath resolves the . and ..
You can run an example with the code below, on my machine, both give the same output.

Vidya Selvaraj

Joined: Nov 21, 2000
Posts: 29
I agree. Here's the link:
subject: absolutepath and canonical path
It's not a secret anymore!