Support Windows paths to config files on CLI

This commit is contained in:
Martyn Taylor 2015-03-03 09:44:52 +00:00
parent 806b9d7e3f
commit 31bee43d63
2 changed files with 7 additions and 0 deletions

View File

@ -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);

View File

@ -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();