6 Replies Latest reply on Dec 12, 2012 7:48 AM by Andrea Taroni 86

    Java.Desktop.open() error

    Andrea Taroni 86
      Hi, I'm using Java 8 pre-release, and I'm trying to use the java.Desktop.open() method in Win7 X32.
      Desktop desktop = Desktop.getDesktop() ;
      desktop.open(new File("//Server/Public/file.txt"));
      but as long I use this syntax, I obtain runtime Error:
      java.io.IOException: Failed to open file:////Server/public/file.txt.
      I tried with
      desktop.open(new File("\\\\Server\\Public\\file.txt"));
      but it produced the same error.
      Finally I used a workaround mapping \\Server\Public as X:
      desktop.open(new File("X:/file.txt"));
      that works.