(Stage primaryStage)
| 176 | } |
| 177 | |
| 178 | @Override |
| 179 | public void start(Stage primaryStage) throws Exception { |
| 180 | try { |
| 181 | if (Desktop.getDesktop().isSupported(Desktop.Action.APP_ABOUT)) { |
| 182 | Desktop.getDesktop().setAboutHandler(null); |
| 183 | } |
| 184 | } catch (final UnsupportedOperationException e) { |
| 185 | logger.error("The os does not support: 'desktop.setAboutHandler'", e); |
| 186 | } catch (final SecurityException e) { |
| 187 | logger.error("There was a security exception for: 'desktop.setAboutHandler'", e); |
| 188 | } |
| 189 | |
| 190 | try { |
| 191 | // Clean up old packages as they consume a lot of hard drive space. |
| 192 | // NOTE! This is a temp hack to give some hard drive space back to users. |
| 193 | // The proper fix would be an upgrade feature where users can upgrade and downgrade as desired. |
| 194 | prunePackages(); |
| 195 | |
| 196 | final Splash splash = new Splash(); |
| 197 | splash.shownProperty().addListener((observable, oldValue, newValue) -> { |
| 198 | if (newValue) { |
| 199 | try { |
| 200 | sequentiallyPreloadNonThreadSafeJavafxClasses(); |
| 201 | kickLoading(splash); |
| 202 | } catch (Throwable t) { |
| 203 | t.printStackTrace(); |
| 204 | logger.error("failed to kick loading", t); |
| 205 | } |
| 206 | } |
| 207 | }); |
| 208 | splash.show(); |
| 209 | } catch (Throwable t) { |
| 210 | t.printStackTrace(); |
| 211 | logger.error("failed start", t); |
| 212 | throw t; |
| 213 | } |
| 214 | } |
| 215 | |
| 216 | @Override |
| 217 | public void stop() { |
no test coverage detected