better handling of file names with spaces on windows

- Quote path names in startup bat file
- Pass File object instead of URI when parsing storage-conf.xml

Patch by Michael Greene; reviewed by eevans for CASSANDRA-307

git-svn-id: https://svn.apache.org/repos/asf/incubator/cassandra/trunk@796345 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Eric Evans 2009-07-21 15:21:59 +00:00
parent b866f81415
commit 32d964ff54
2 changed files with 4 additions and 3 deletions

View File

@ -45,7 +45,7 @@ set JAVA_OPTS=^
REM ***** CLASSPATH library setting *****
REM Shorten lib path for old platforms
subst P: %CASSANDRA_HOME%\lib
subst P: "%CASSANDRA_HOME%\lib"
P:
set CLASSPATH=P:\
@ -58,7 +58,7 @@ goto :eof
:okClasspath
set CASSANDRA_CLASSPATH=%CASSANDRA_HOME%;%CASSANDRA_CONF%;%CLASSPATH%;%CASSANDRA_HOME%\build\classes
set CASSANDRA_PARAMS=-Dcassandra -Dstorage-config=%CASSANDRA_CONF%
set CASSANDRA_PARAMS=-Dcassandra -Dstorage-config="%CASSANDRA_CONF%"
goto runDaemon
:runDaemon

View File

@ -43,7 +43,8 @@ public class XMLUtils
{
DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
DocumentBuilder db = dbf.newDocumentBuilder();
document_ = db.parse(xmlSrc);
File xmlFile = new File(xmlSrc);
document_ = db.parse(xmlFile);
XPathFactory xpathFactory = XPathFactory.newInstance();
xpath_ = xpathFactory.newXPath();