0

I am having trouble with Java escape characters. I have these from Confluent ccloud configs example. but does not work . both give me the same error message Error:(16,114) java: illegal escape character

props.put(SaslConfigs.SASL_JAAS_CONFIG, "org.apache.kafka.common.security.plain.PlainLoginModule required username\="<abcdfg>" password\="<xyz123>";");

props.put(SaslConfigs.SASL_JAAS_CONFIG, "org.apache.kafka.common.security.plain.PlainLoginModule \
username=\"abcdfg\" password=\"xyz123\";");
  • Where exactly is (16, 114)? The backslash right before the newline (on the 2nd line)? – user Jul 12 '20 at 19:02

1 Answers1

2

Hello, change ";" to \";\"". Otherwise your IDEA thinks that the string will end there, even though it is not.

Have fun, I hope I could help you!

verity
  • 375
  • 1
  • 11