I am trying to get the absolute path of working directory, and pass it to a method. I am getting the path in the form
C:\eclipse\workspace\file.txt
but eclipse must receive it in the form:
C:\\eclipse\\workspace\\file.txt
So I am doing a replace, but it works only for one char, how to modify it?
String path = new File("").getAbsolutePath();
path = path.replace( '\\', '\\\\' );
something = method.read(path+"\\file.txt");