Uploaded image for project: 'Apache NiFi'
  1. Apache NiFi
  2. NIFI-8734

NiFi Toolkit .bat breaks with paths containing spaces

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Won't Do
    • 1.13.2
    • None
    • None
    • Windows Server 2019 1809 (Win 10), PowerShell 5.1, Oracle JRE 1.8. 291

    Description

      I'm using PowerShell on Windows Server 2019 with Java 1.8, and the following command run from the "nifi-toolkit-1.13.2" directory:

      cd 'C:\Program Files\Apache\NiFi Toolkit\nifi-toolkit-1.13.2\'
      .\bin\tls-toolkit.bat standalone -h

      returns: 

      Error: Could not find or load main class Files\Apache\NiFi
      

      I believe the issue lies with spaces in the path where toolkit is located and if I alter this line in the tls-toolkit.bat:

      SET JAVA_PARAMS=-cp %LIB_DIR%\* %JAVA_OPTS% org.apache.nifi.toolkit.tls.TlsToolkitMain
      

      to include double quotes around the %LIB_DIR% variable:

      SET JAVA_PARAMS=-cp "%LIB_DIR%\*" %JAVA_OPTS% org.apache.nifi.toolkit.tls.TlsToolkitMain

       It works as expected.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              _mark_ Mark Ward
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: