From 31bee43d63c44afef4b963c7803c3373ec08eae5 Mon Sep 17 00:00:00 2001 From: Martyn Taylor Date: Tue, 3 Mar 2015 09:44:52 +0000 Subject: [PATCH] Support Windows paths to config files on CLI --- .../src/main/java/org/apache/activemq/cli/commands/Run.java | 3 +++ .../src/main/java/org/apache/activemq/cli/commands/Stop.java | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/activemq-bootstrap/src/main/java/org/apache/activemq/cli/commands/Run.java b/activemq-bootstrap/src/main/java/org/apache/activemq/cli/commands/Run.java index 1acf05caa6..e48a5a5928 100644 --- a/activemq-bootstrap/src/main/java/org/apache/activemq/cli/commands/Run.java +++ b/activemq-bootstrap/src/main/java/org/apache/activemq/cli/commands/Run.java @@ -63,6 +63,9 @@ public class Run implements Action configuration = "xml:" + activemqHome + "/config/non-clustered/bootstrap.xml"; } + // To support Windows paths as explained above. + configuration = configuration.replace("\\", "/"); + System.out.println("Loading configuration file: " + configuration); BrokerDTO broker = BrokerFactory.createBrokerConfiguration(configuration); diff --git a/activemq-bootstrap/src/main/java/org/apache/activemq/cli/commands/Stop.java b/activemq-bootstrap/src/main/java/org/apache/activemq/cli/commands/Stop.java index fab53e7abf..26b2c34b89 100644 --- a/activemq-bootstrap/src/main/java/org/apache/activemq/cli/commands/Stop.java +++ b/activemq-bootstrap/src/main/java/org/apache/activemq/cli/commands/Stop.java @@ -43,6 +43,10 @@ public class Stop implements Action { configuration = "xml:" + activemqHome + "/config/non-clustered/bootstrap.xml"; } + + // To support Windows paths as explained above. + configuration = configuration.replace("\\", "/"); + BrokerDTO broker = BrokerFactory.createBrokerConfiguration(configuration); String fileName = new URI(broker.server.configuration).getSchemeSpecificPart();