I tryied using JAVA_OPTS=-Xms1024m -Xmx1024m ... in a script file. It shows error like "-Xmx1024m: command not found".
After quoting the assignment in double or single quotes, the error disappear.
And I found that the error is caused by the first dash sign. Because all assignments like "a=-bb xx yy ..." will raise the same error: it tried to run the xx as a program. It seems that shell recognize the second word as a command if the first word begins with a dash sign as long as there's no quotes in the assignment expression.
So my question is: what does assignment expression begins with dash sign mean in shell? I'm using bash as default.