Error occurred during initialization of VM. Incompatible initial and maximum heap sizes specified
This probably means that you supplied both -Xms and -Xmx options, and the -Xms (initial heap size) value is larger than the -Xmx (maximum heap size) value.
netbeans provide to change the -Xms only from Properties > run > VM options
I'm not a NetBeans user. However, a brief search of the Using NetBeans 5.0 manual says this is not correct:
Setting JVM Arguments
You can specify JVM arguments for the project in the Project Properties dialog
box. Open the Project Properties dialog box and click Run in the Categories pane
and then type a space-separated list of JVM arguments in the VM Options field.
In other words, you can set any JVM option that your JVM supports.
here is the string that i changed -Xms512m
(Finally he tells us!!)
Add -Xmx512m as well.
For the record, the common JVM options (such as -Xmx and -Xms) are clearly documented in the manual page for the java command. You should READ it CAREFULLY.