This will break the Shell stager in all other Java architectures (both when called via Metasploit Payload class and when called from exploits or via tunnelling from outside Metasploit). The parameters array will be filled in all of those cases, sometimes with IP and Port information, sometimes only with dummy information (like "Payload --" or "Payload -- Shell"). If you want to use the parameters from within the payload, either scan for "--" and only use parameters behind it (but be aware that the first parameter after the "--" may be the name of the payload) or go the easy route and only use the last parameter if the second last parameter is some token you invented like "-ShellCommand" (or the other way round). Meterpreter stage uses a similar approach to get the "NoRedirect" flag filled via StageParameters in the property file.

Or maybe you really want to use the Exec stage from here: 
https://github.com/schierlm/JavaPayload/blob/master/JavaPayload/src/javapayload/stage/Exec.java