I searched for this question and got many many matches on stackoverflow itself, but the answers in there are sort of contradicting.
In Ques: How to add VM options to jar? the top-voted+accepted says it is not possible and also most of the answers in Ques: Can I set Java max heap size for running from a jar file? say that No, it is not possible. Most of these answers saying "not possible" were given by people with high reputation and therefore I assume they cannot all be just wrong by coincidence.
One guy said that it can be done by using this others said to make a installer for it, or use Launch4J or make batch files or make another JAR and run the main through this but most of these did not get many votes as compared to those saying "no".
So is it really possible or not? My problem is that I run out of heap space and therefore I want to increase it in JAR.
Q1. I have set increased Heap space from netbeans, will it be increased in the JAR too? (I think no, I am just confirming this one)
Q2. What should I do now to make the increased heap space in JAR? (I am looking for an easy to do way because I do not have knowledge about batch scripting and all and also that I am already putting an Installer to place these files(Advanced Installer) so I do not want to put additional Installers to do this) Is there a simple way out?