Hi,
An absolute path is the path name that starts with a '\' or follows the volume name(eg: g

.
A relative path is the one that starts with ..\dir\subdir\filename
Now suppose that our current working directory is g:\dir
consider this program:
import java.io.*;
public class AbsCan
{
public static void main(
String str[])
{
File f=new File(str[0]);
System.out.println("Path = "+f.getPath());
System.out.println("AbsolutePath = "+f.getAbsolutePath());
try
{
System.out.println("CanonicalPath = "+f.getCanonicalPath());
//System.out.println("isabs? = "+f.isAbsolute());
}
catch(IOException ie)
{
System.out.println("************"+ie);
}
}
}
If we run this program with the command line argument
g:\dir>
java AbsCan g:\dir\subdir\filename
The output is
g:\dir\subdir\filename for all the three print statements.
If we run this program like
g:\dir>java AbsCan ..\subdir\filename
Then the output will be
Path =..\subdir\filename
AbsolutePath =g:\dir\..\subdir\filename
//Note: cwd concatenated with cdm line argument
CanonicalPath =g:\subdir\filename
//Note: relative references all resolved.
//But why & where to use this "resolved reference"? Beats me!
isAbsolute() returns true if the path is absolute.(ie the first case)
Good Luck!