absolute path parameter java
<p>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</p>

<pre><code>C:\eclipse\workspace\file.txt
</code></pre>

<p>but eclipse must receive it in the form:</p>

<pre><code>C:\\eclipse\\workspace\\file.txt
</code></pre>

<p>So I am doing a replace, but it works only for one char, how to modify it?</p>

<pre><code>String path = new File("").getAbsolutePath();
path  = path.replace( '\\', '\\\\' );
something  = method.read(path+"\\file.txt");
</code></pre>
