It has been a source of errors for many, many years: turning Weka command-line options into Java code. The correct escaping of backslashes and double quotes has wasted many developer hours in the past. But, there is a solution! 😉
The command-to-code Weka package allows you to turn command-lines obtained, eg, from the Weka Explorer into valid Java code snippets. This makes the copy/pasting into your own code a lot easier.
The plugin adds itself to the GUIChooser’s main menu, under Extensions as Command to code.