Hello,
I created a jar file to execute my code except that I get a heap space
error. Is there anyways I could modify the MANIFEST file in order to
dynamically increase the heap space for the executed depending on the
computer it is being run on?
Brandon McCombs - 27 Mar 2006 02:32 GMT
> Hello,
>
> I created a jar file to execute my code except that I get a heap space
> error. Is there anyways I could modify the MANIFEST file in order to
> dynamically increase the heap space for the executed depending on the
> computer it is being run on?
I've never seen that done in the manifest but there are switches that
can be used with the java.exe binary that can set various heap space
values. Wrapping the execution of your jar file in a .bat file (if in
windows) would allow you to set those values in the .bat when you call
the .jar file.
Roedy Green - 27 Mar 2006 03:27 GMT
>I created a jar file to execute my code except that I get a heap space
>error. Is there anyways I could modify the MANIFEST file in order to
>dynamically increase the heap space for the executed depending on the
>computer it is being run on?
I think you are hosed here. By the time java.exe gets round to
examining a Jar file, it has already mapped out RAM. effectively too
late to specify parms inside the jar.
That is one of the gotchas mentioned at
http://mindprod.com/jgloss/jar.html#GOTCHAS
You can use JAWS which lets you specify them in the JNLP file. See
http://mindprod.com/jgloss/javawebstart.html

Signature
Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.