Thomas Zander wrote:
> I think you want:
>
> String path = new File(getAbsolutePath()).getConicalPath().
> replace(separatorChar, '/');
> [...]
We definitely shouldn't do a getCanonicalPath. It may require file system access and
it can fail in all sorts of ways. Sun doesn't canonicalize either.
> To continue the little code example:
> > if(!path.startsWith("/"))
> > � path = "/" + path;
> > return new URI(...);
>
> If you use the getAbsolutePath() you don't need this check.
On Windows, you do. getAbsolutePath return "c:\\foo.txt" and the URL path should start
with a slash.
Regards,
Jeroen
_______________________________________________
Classpath mailing list
[EMAIL PROTECTED]
http://lists.gnu.org/mailman/listinfo/classpath