I am launching a java jar file which often requires more than the default 64MB max heap size. A 256MB heap size is sufficient for this app though. Is there anyway to speci
I had a similar need, and thought I should be able to specify this in the manifest as suggested above. However, this is not possible. My solution is similar to what Alex suggested above, however, what I did was to have the main method use Java's ProcessBuilder to start another Java process. When starting another process you can specify the maximum memory for the new process. You are essentially having one Java process start another one. It's a little hokey, but it does work and it still allows you to launch your app by double-clicking the Jar file, which I know you want to do. Look into the ProcessBuilder.
you could also use a wrapper like launch4j which will make an executable for most OS:es and allows you to specify VM options.