6 Replies Latest reply: Dec 12, 2012 1:48 AM by 979024 RSS

    Java.Desktop.open() error

    979024
      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.