title: Load image from a network drive?
body: <p>My workstation is running windows, and we develop Java Applications that run on windows. On these windows desktops we have access to our shared network drive. So I need to load an image from the network drive, but it doesn't work. Am I doing this wrong?</p>
  
  <pre><code>import java.awt.Image;
  import java.awt.Toolkit;
  
  import javax.swing.ImageIcon;
  import javax.swing.JOptionPane;
  
  public class LoadImage {
      public static void main(String[] args) {
          try  {
              Image image = Toolkit.getDefaultToolkit().getImage("\\\\networkdive\\folderonnetwork\\image.jpg");  
              JOptionPane.showMessageDialog(null, "", "", JOptionPane.INFORMATION_MESSAGE, new ImageIcon(image));
          } catch (Exception e) {
              e.printStackTrace();
          }
      }
  }
  </code></pre>