Skip to content
Permalink
Browse files Browse the repository at this point in the history
Quote binary path
  • Loading branch information
tananaev committed Jan 1, 2021
1 parent 5d0bace commit cc69a99
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/java/org/traccar/WindowsService.java
@@ -1,5 +1,5 @@
/*
* Copyright 2018 Anton Tananaev (anton@traccar.org)
* Copyright 2018 - 2020 Anton Tananaev (anton@traccar.org)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -50,7 +50,7 @@ public void install(
String account, String password, String config) throws URISyntaxException {

String javaHome = System.getProperty("java.home");
String javaBinary = javaHome + "\\bin\\java.exe";
String javaBinary = "\"" + javaHome + "\\bin\\java.exe\"";

File jar = new File(WindowsService.class.getProtectionDomain().getCodeSource().getLocation().toURI());
String command = javaBinary
Expand Down

0 comments on commit cc69a99

Please sign in to comment.