Java file path in Linux
<p>I have a rather silly question, but I haven't been able to find a solution for this: </p>

<p><em>When I try and read a file I get a "file not found error" is runtime. It compiled the file though.</em></p>

<p>I am on Linux, so I use the statement something like:</p>

<pre><code>Scanner s = new Scanner(new File("home/me/java/ex.txt"));
</code></pre>

<p>and it gives me a runtime rror:</p>

<pre><code>/home/me/javaException in thread "main" java.io.FileNotFoundException: home/me/java/ex.txt (No such file or directory)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.&lt;init&gt;(FileInputStream.java:137)
at java.util.Scanner.&lt;init&gt;(Scanner.java:653)
at test.main(test.java:14)
</code></pre>

<p>I tried changing every possible thing along the lines of filenames, but nothing seems to work.</p>

<p>Any clues as to why this is happening? where does java look for files by default?</p>
