I have a GUI application that needs to open directories for the user.
This is (will be) a Java 7 application. It requires java.nio.file.attribute.Attributes. My JVM is jdk-64-1.7-b96-03-jun-2010
My problems is that when I call
java.awt.Desktop.getDesktop().open(file);
where file is a directory, it fails to open the directory, and hangs.
This does not happen when I call it from the "main" thread, during testing, or from trivial starts like
public static main(String[] args){
java.awt.Desktop.getDesktop().open(File.listRoots()[0]);
}
, but when I call it from a SwingWorker, or other runnable, the call never returns.
I have not tried this yet on Java 6, but I will asap. Until then, is this a known issue? is there a way to get this to work from the EventDispatchThread?
Thanks!