It really depends on your shell. You did not say which operating system you are using. For example, on Windows this will work:
java Test toto "has:\"tutu titi\""
I believe the same will work in bash too.
But if you ask what you can do in Java to solve this problem: nothing. The shell will parse the command line before invoking the process, and you cannot cancel this parsing.
source share