I saw the same issue, here's the solution... escape the double quotes...
java -d64 -Xmx64M -jar ./jmxcmd.jar - 192.168.2.222:9005 "\"kafka.server\":type=\"BrokerTopicMetrics\",name=\"AllTopicsMessagesInPerSec\"" Count RateUnit FiveMinuteRate FifteenMinuteRate OneMinuteRate MeanRate
Wrapping with single quotes might also work, but I've not tried that yet.
'"kafka.controller":type="ControllerStats",name="LeaderElectionRateAndTimeMs"'
java -d64 -Xmx64M -jar ./jmxcmd.jar - 192.168.2.222:9005 "\"kafka.server\":type=\"BrokerTopicMetrics\",name=\"AllTopicsMessagesInPerSec\"" Count RateUnit FiveMinuteRate FifteenMinuteRate OneMinuteRate MeanRate
Wrapping with single quotes might also work, but I've not tried that yet.
'"kafka.controller":type="ControllerStats",name="LeaderElectionRateAndTimeMs"'