Open a path with Desktop.open() from java on ubuntu (linux)
问题 From my application written in java I want to open a folder, using the operating system file explorer. I use Desktop.open(new File(path)) This works fine on windows, but on ubuntu 11.10 (linux) it doesn't work. Using the Desktop.open to open a file does work, both on ubuntu and windows. Using a step in between: File fPath=new File(fPath) and testing it with fPath.exists() and fPath.isDirectory() both gives true. using the Desktop.open(new File(path)) gives me this exception: java.io