FULL PRODUCT VERSION :
java version "1.8.0_66-ea"Java(TM) SE Runtime Environment (build 1.8.0_66-ea-b02)Java
HotSpot(TM) 64-Bit Server VM (build 25.66-b02)
ADDITIONAL OS VERSION INFORMATION :
Ubuntu trusty 14.04
A DESCRIPTION OF THE PROBLEM :
Using HostServices.showDocument to show a .pdf file or display a folder does nothing
on Ubuntu 14.04 - the same software runs correctly on Windows and Apple Mac
platforms.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Try to show a pdf file with HostServices.showDocument
Nothing happens
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
HostServices hostServices= InetSure.application.getHostServices();
String path;
if(filePath.charAt(0)==File.separatorChar) path= "file://" + filePath;
else path= "file:///" + filePath;
hostServices.showDocument(path);
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
use Desktop instead of HostServices:
SwingUtilities.invokeLater(()-> {try{Desktop.getDesktop().open(new File(filePath));
}catch(IOException exc) { // handle exception } });
java version "1.8.0_66-ea"Java(TM) SE Runtime Environment (build 1.8.0_66-ea-b02)Java
HotSpot(TM) 64-Bit Server VM (build 25.66-b02)
ADDITIONAL OS VERSION INFORMATION :
Ubuntu trusty 14.04
A DESCRIPTION OF THE PROBLEM :
Using HostServices.showDocument to show a .pdf file or display a folder does nothing
on Ubuntu 14.04 - the same software runs correctly on Windows and Apple Mac
platforms.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Try to show a pdf file with HostServices.showDocument
Nothing happens
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
HostServices hostServices= InetSure.application.getHostServices();
String path;
if(filePath.charAt(0)==File.separatorChar) path= "file://" + filePath;
else path= "file:///" + filePath;
hostServices.showDocument(path);
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
use Desktop instead of HostServices:
SwingUtilities.invokeLater(()-> {try{Desktop.getDesktop().open(new File(filePath));
}catch(IOException exc) { // handle exception } });