You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Holger Klawitter <li...@klawitter.de> on 2003/01/20 13:25:56 UTC

OT: on File.separator (was: How do I get the absolute path ...)

Hai,

> > 	java.io.File dir1 = new java.io.File ("..\\"); // line 1
> new java.io.File( ".." + File.separator ) would be a somewhat cleaner.
> more over, we can use suitabe seperators depending on the operating system.

File.separator already gives you the Separator for the current OS.

> I guess for Unix system this must be a forward slash "/". I'm not sure
> whether its "/" or "//"

You know why you have to type "\\" instead of "\" in Java, don't you? ;-)

Regards,
	Holger


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>