From cc69a9907ac9878db3750aa14ffedb28626455da Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Fri, 1 Jan 2021 14:50:35 -0800 Subject: Quote binary path --- src/main/java/org/traccar/WindowsService.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/traccar/WindowsService.java b/src/main/java/org/traccar/WindowsService.java index 831cd3ebc..f233337a7 100644 --- a/src/main/java/org/traccar/WindowsService.java +++ b/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. @@ -50,7 +50,7 @@ public abstract class WindowsService { 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 -- cgit v1.2.3