[daisy] Problem with quotes in daisy scripts on Windows

Bruno Dumon bruno at outerthought.org
Wed Mar 7 03:19:22 CST 2007


On Tue, 2007-03-06 at 18:33 +0100, Andreas Deininger wrote:
> 2007/3/6, Bruno Dumon <bruno at outerthought.org>:
> > Hi,
> >
> > I'm trying out Daisy on Windows (XP) and have problems because Java
> > doesn't understand the quoted -D arguments in the scripts (such as
> > daisy-repository-init.bat or daisy-repository-server.bat).
> >
> > So for example the following is a problem:
> > "-Ddaisy.datadir=%DATADIR%"
> 
> One more argument to include the wrapper script inside the official
> distribution ;-)
> 
> > while it works without the quotes or with the quotes only around the
> > value.
> >
> > Does this work for anyone else? Is this something which depends on the
> > Windows or Java version?
> 
> I just tried to run the lastest SVN on Windows XP, which didn't cause
> any problems, it ran just out of the box. (I just started up the
> repository server though.) Inside my daisy-repository-server.bat, here
> inside the MERLIN_JVM_OPTS, I have something like
> "-Ddaisy.datadir=%DATADIR%", which doesn't  cause any problems.
> 
> java version 1.5.0_08
> WIN XP SP2

I tried again now and didn't have the problem... and found out why: I
had a backslash at the end of the datadir, causing the argument to be
something like "-Ddaisy.datadir=c:\datadir\", and \" is actually the
escape syntax to insert a double quote inside a quoted string...

Anyone knows if it is possible to test if a string ends on a backslash
in Windows batch files? (or another solution)

-- 
Bruno Dumon                             http://outerthought.org/
Outerthought - Open Source, Java & XML Competence Support Center
bruno at outerthought.org                          bruno at apache.org



More information about the daisy mailing list