how to read text file on any machine in java
<p>I am trying to read file,but it is reading only on my machine,it is not working on another machine.Here is my code..  </p>

<pre><code>FileInputStream fstream=new FileInputStream("/path of myfile/User.txt");    
DataInputStream in = new DataInputStream(fstream);
BufferedReader br = new BufferedReader(new InputStreamReader(in));
String str;
while ((str =  br.readLine()) != null) {
    System.out.println(str);
} 
</code></pre>

<p>Please help me,how to read file on another machine as well,what changes should I make?</p>
