First, the parameters must be an array, not a string. So you can try sth as follows.
String[] options = {"-C", "1.0", "-M", "1"}; cls.setOptions(options);
More importantly, a small error should be noticed carefully. In both your question and the previous answer from @Sentry, the shorter line comes before C, for example "-C"; but before M there is a longer line, for example "-M".
If you follow closely, you will find that the signs before M are not really minus signs because it is longer than the minus sign. When you change a longer line to a minus sign, you can get the correct result from the codes above.
Good luck.
source share