title: What is the recommended way of accessing a network share folder (located in Windows or Linux) in java
body: <p>All, Forgive me I am not familiar with the Linux. 
  I am trying to read all the files of a network share folder which is located in either Windows or Linux system.</p>
  
  <p>Currently I just made it work for the case of Windows by below code.</p>
  
  <pre><code>networkShareFolder="\\\\10.50.90.18\\ITS Tool\\xml\\";//It is a windows Network share path.
  File[] files = new File(networkShareFolder).listFiles();
  </code></pre>
  
  <p>But When I deploy my application to the Linux system and run it. It just told me can not get any files from the specified <code>networkShareFolder</code>;</p>
  
  <p>So I tried to type the path <code>\\10.50.90.18</code> in the File explorer of Linux like what I did in the windows. To see if the path can be reached from the Linux system. But it just told me <code>Can't locate the \\10.50.90.18</code>. But I am sure the IP can be ping from the Linux. </p>
  
  <p>So my questions are </p>
  
  <ol>
  <li>Why <code>\\10.50.90.18</code> can't be accessed in Linux .But can be accessed in Windows. (I am sure their IP are all 10.50.90.*) </li>
  <li>What is the best way to access the network share folder from windows or linux ?</li>
  </ol>
  
  <p>Thanks.</p>