title: How to authenticate and connect to the network drive in java
body: <p>Could any one please tell how to authenticate and connect to the network drive(folder) in java in windows system. We tried with following code to connect to the network drive.</p>
  
  <pre><code>Process proc = Runtime.getRuntime().exec("cmd.exe /C START  net use M: \\127.0.0.1\\sharedNetworkDrive");
  </code></pre>
  
  <p>But problem with this code is not having any authentication(username and password) for that shared drive (sharedNetworkDrive). Can anyone please guide how to do this.</p>