Ok, it worked perfectly in command line but when testing end to end I found out that all quotes and apostrophes were replaced with &aquot; and & apos;. The arguments are being passed in the vm through an xml, so I guess that's why they were converted. Is a way to do the same without apostrophes or quotes?