How to construct a relative path in Java from two absolute paths (or URLs)?
Posted
by VoidPointer
on Stack Overflow
See other posts from Stack Overflow
or by VoidPointer
Published on 2008-10-15T13:53:42Z
Indexed on
2010/06/16
9:52 UTC
Read the original article
Hit count: 184
Given two absolue paths, e.g.
/var/data/stuff/xyz.dat
/var/data
How can one create a relative path that uses the second path as its base? In the example above, the result should be: ./stuff/xyz.dat
© Stack Overflow or respective owner