title: connecting to shared folder in windows with java
body: <p>I need to connect to a shared folder on a remote windows machine through java , where i put my domain authentication (username and password ) in the code , here is my code</p>
  <pre><code> File file = new File(&quot;\\\\theRemoteIP\\webapps&quot;);   
      File[] files = file.listFiles();  
      System.out.println(&quot;access done&quot;);  
  
      for (int i = 0; i &lt; files.length; i++)  
      {  
          String name = files[i].getName();  
          System.out.println(name);  
      }  
  </code></pre>
  <p>Thanks</p>