Skip to content

Commit

Permalink
fix desktop check
Browse files Browse the repository at this point in the history
  • Loading branch information
Kr0nox committed Jul 2, 2024
1 parent dae94c3 commit 068cde8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cli/src/main/java/de/jplag/cli/JPlagRunner.java
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public static void runInternalServer(File zipFile, int port) throws IOException
ReportViewer reportViewer = new ReportViewer(zipFile, port);
int actualPort = reportViewer.start();
logger.info("ReportViewer started on port http://localhost:{}", actualPort);
if (Desktop.isDesktopSupported()) {
if (Desktop.isDesktopSupported() && Desktop.getDesktop().isSupported(Desktop.Action.BROWSE)) {
Desktop.getDesktop().browse(URI.create("http://localhost:" + actualPort + "/"));
} else {
logger.info("Could not open browser. You can open the Report Viewer here: http://localhost:{}/", actualPort);
Expand Down

0 comments on commit 068cde8

Please sign in to comment.