Uploaded image for project: 'Apache Jena'
  1. Apache Jena
  2. JENA-286

Windows Batch scripts don't handle paths with spaces correctly

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • Jena 2.7.2
    • Jena 2.7.3
    • ARQ, Jena, RIOT, TDB
    • None
    • Windows

    Description

      In tracking down the error reported by a user on the mailing list with running the scripts on Windows I discovered they don't appropriately handle spaces.

      While someone clearly wrote them with this in mind as written it doesn't work. For example consider sparql.bat which is written like so currently:

      set JVM_ARGS=-Xmx1024M
      set JENA_CP="%JENAROOT%\lib*;"
      set LOGGING=-Dlog4j.configuration=file:%JENAROOT%/jena-log4j.properties

      java %JVM_ARGS% %LOGGING% -cp %JENA_CP% arq.sparql %*
      exit /B

      In order to work correctly it must actually be written like this:

      set JVM_ARGS=-Xmx1024M
      set JENA_CP=%JENAROOT%\lib*;

      java %JVM_ARGS% -Dlog4j.configuration="file:%JENAROOT%/jena-log4j.properties" -cp "%JENA_CP%" arq.sparql %*
      exit /B

      The cause of the error is that quotes used when setting a variable do not actually carry through when that variable is accessed

      Issue will be closed when all batch scripts are appropriately updated

      Attachments

        Activity

          People

            rvesse Rob Vesse
            rvesse Rob Vesse
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: