Here's my code
if (Desktop.isDesktopSupported()) {
Desktop desktop = Desktop.getDesktop();
if (desktop.isSupported(Desktop.Action.OPEN)) {
try {
desktop.open(file.getCanonicalFile());
} catch (Exception ex) {
ex.printStackTrace();
}
} else {
System.out.println("Desktop open action is not supported");
}
} else {
System.out.println("Desktop is not supported");
}
I know that installing MagicISO (got it from this Java bug) will make this code doesn't work. But why? What does MagicISO specificially do? Can I prevent it to happen or work it around?
Even worse, this code doesn't throw any exception. It just stays silent there. This really really makes me crazy.