Description
This issue is very similar to KAFKA-3692, but occurs further down in kafa-run-class.sh:
If at the end of all processing CLASSPATH contains only a single component including wildcards, the shell will evaluate CLASSPATH on starting Java, thus breaking the command line.
To elaborate:
Problem:
If CLASSPATH is '/some/path/*', then
java -cp $CLASSPATH
becomes
java -cp /some/path/*
which in turn becomes
java -cp /some/path/file1 /some/path/file2
Solution:
This can be prevented by encapsulating CLASSPATH in quotes:
java -cp "$CLASSPATH"
which becomes
java -cp "/some/path/*"
and is handed like that to Java.
Attachments
Issue Links
- relates to
-
KAFKA-3692 Wildcards in External CLASSPATH may cause it not be included in the CLASSPATH
- Resolved
-
KAFKA-6478 kafka-run-class.bat fails if CLASSPATH contains spaces
- Resolved
- links to