In my application I have a button that calls the function below when clicked. When I click once, firefox is opened normally with my html file, but if I click again the program stops working. I tested closing firefox before clicking again, but the program still crashes.
If I set chrome as my default browser and click in the button this message appears in my IDE:
"ATTENTION: default value of option force_s3tc_enable overridden by environment."
However the HTML file is opened normally, but if I click again it crashes. Obs: if firefox is my default browser the IDE doesn't show any messages. (I'm using IntelliJ, java version is 10).
So what should I do to be able to click more than 1 time?
@FXML
public void showListOnBrowser () {
File htmlFile = new File(dir.getPath() + "/" + Main.usuario.getName() + ".html");
try {
Desktop.getDesktop().browse(htmlFile.toURI());
} catch (IOException e) {
e.printStackTrace();
return;
}
}
}