[
https://issues.apache.org/jira/browse/NIFI-8734?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Mark Ward updated NIFI-8734:
----------------------------
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:
{code:java}
cd 'C:\Program Files\Apache\NiFi Toolkit\nifi-toolkit-1.13.2\'{code}
{code:java}
.\bin\tls-toolkit.bat standalone -h{code}
returns:
{code:java}
Error: Could not find or load main class Files\Apache\NiFi
{code}
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:
{code:java}
SET JAVA_PARAMS=-cp %LIB_DIR%\* %JAVA_OPTS%
org.apache.nifi.toolkit.tls.TlsToolkitMain
{code}
to include double quotes around the %LIB_DIR% variable:
{code:java}
SET JAVA_PARAMS=-cp "%LIB_DIR%\*" %JAVA_OPTS%
org.apache.nifi.toolkit.tls.TlsToolkitMain{code}
It works as expected.
was:
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:
{code:java}
cd 'C:\Program Files\Apache\NiFi Toolkit\nifi-toolkit-1.13.2\'{code}
{code:java}
.\bin\tls-toolkit.bat standalone -h{code}
returns:
{code:java}
Error: Could not find or load main class Files\Apache\NiFi
{code}
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:
{code:java}
SET JAVA_PARAMS=-cp %LIB_DIR%\* %JAVA_OPTS%
org.apache.nifi.toolkit.tls.TlsToolkitMain
{code}
to include double quotes around the %LIB_DIR% variable:
{code:java}
SET JAVA_PARAMS=-cp "%LIB_DIR%\*" %JAVA_OPTS%
org.apache.nifi.toolkit.tls.TlsToolkitMain{code}
It works as expected.
> NiFi Toolkit .bat breaks with paths containing spaces
> -----------------------------------------------------
>
> Key: NIFI-8734
> URL: https://issues.apache.org/jira/browse/NIFI-8734
> Project: Apache NiFi
> Issue Type: Bug
> Affects Versions: 1.13.2
> Environment: Windows Server 2019 1809 (Win 10), PowerShell 5.1,
> Oracle JRE 1.8. 291
> Reporter: Mark Ward
> Priority: Major
> Labels: newbie
>
> 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:
> {code:java}
> cd 'C:\Program Files\Apache\NiFi Toolkit\nifi-toolkit-1.13.2\'{code}
> {code:java}
> .\bin\tls-toolkit.bat standalone -h{code}
> returns:
> {code:java}
> Error: Could not find or load main class Files\Apache\NiFi
> {code}
> 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:
> {code:java}
> SET JAVA_PARAMS=-cp %LIB_DIR%\* %JAVA_OPTS%
> org.apache.nifi.toolkit.tls.TlsToolkitMain
> {code}
> to include double quotes around the %LIB_DIR% variable:
> {code:java}
> SET JAVA_PARAMS=-cp "%LIB_DIR%\*" %JAVA_OPTS%
> org.apache.nifi.toolkit.tls.TlsToolkitMain{code}
> It works as expected.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)