Please answer these questions before submitting your issue.
What version of gRPC are you using?
1.21
What did you expect to see?
I build gRPC code with Bazel using Remote Build Execution (RBE) and I have to use a custom jdk8 toolchain [.bazelrc snippet]. Java toolchain flags don't seem propagated to the java_rpc_toolchain rule as it declares a fixed dependency on the default Java toolchain, which is jdk10 for Bazel v0.25.0. I believe this is the primary reason contributing to the following error returned by Bazel:
Unrecognized VM option 'CompactStrings'
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
Please let me know if I can do anything else to enforce a custom Java toolchain for Bazel gRPC rules.