The Javadoc here needs to be pretty explicit about this being a best effort attempt, and that most likely the user will need to do their own escaping based on their own shell environment.