So the jvm option will not accept anything other than K, G or M. It will throw an error. But let me add in a default option just to round off the bases.

$ java -Xmx1024Z k.java
Invalid maximum heap size: -Xmx1024Z
Could not create the Java virtual machine.
]$