You can use System.getPropereties("os.name") to get the operating system's name. But the better way to do what you are trying to do is to use the static separator or separatorChar variables of the File class to determine what separator the OS uses. You can then construct a path:
Look at the
API Docs for the File class for more information.
[edit note: My API link previously was linking to the
J2EE API docs rather then the J2SE docs; sorry for any confusion]
[ February 19, 2005: Message edited by: Mark Vedder ]