This was identified while researching solutions to the following Tomcat bug:
https://bz.apache.org/bugzilla/show_bug.cgi?id=63815
While the Tomcat case is a little more complicated, this issue can be reduced to trying to pass a system property where the value contains a space. This works with java but the equivalent jdb fails.
A test case is available here:
https://github.com/markt-asf/tomcat-bugs/tree/master/src/java/org/apache/tomcat/bug63815
You need EchoArgs.java and jdb-test.sh.
EchoArgs.java is a simple Java program that echos the arguments used to the console.
jdb-test.sh first calls this program via java and then via jdb
java "-Dfoo=ba" ...
and
jdb "-Dfoo=ba" ...
work as expected. However, if a space is inserted:
java "-Dfoo=b a" ...
works but
jdb "-Dfoo=b a" ...
fails. It thinks a is the main class name.