Originally posted by kajal mukergi:
this is my code
here i am getting the _destinationLocation value from .properties file
as C:\xyz this fine for window..
and working fine here
but in UNIX it is failing as
the directory stucture is.. "./xyx"
so my code is breaking
can any one tell how to handle..
or how to diferentiate whether it is unix or window os
Hi,
Use File.separator instead of hard coded
string which will enable your code to run in both env.
for (String file : files) {
File destinationLocation = new File(_destinationLocation);
String _destpath = destinationLocation.getPath();
_destpath += File.separator;
_destpath += file;
}