posted 23 years ago
Hi
Relative means that the path you will supply is 'relative' to the current working directory whereas absolute means to just follow the path absolutely starting at the systems/context/root directory.
If I am running my application in c:\myapps\javaApps\testStuff\ and I specify...
../../images/Relative.jgp
This will go into c:\myapps\images and look for Relative.jpg file becuse the ../ means backup a directory. the path is in relation to the current working directory.
If I put...
/oldFiles/OldClass.java
Then I will look in c:\myapps\javaApps\testStuff\oldFiles for the file OldClass.java because the path is 'relative' to the current one so it goes into the oldFiles subdirectory. Again the path is in relation to my current one.
If I do..
C:\anotherPlace\images\Absolute.jgp I will go absolutely into that directory. It has nothing to do with my working directory.
There are times when the "current" directory will be harder to determine like with web paths (they may have diffrent default or root directories, but these you will have to read up on.
Hope this helps.
SOURCE CODE should be SURROUNDED by "code" tags.