Jar file heap space

C

cryptogirl

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?
 
B

Brandon McCombs

cryptogirl said:
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.
 
R

Roedy Green

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,680
Members
48,796
Latest member
Greg L.

Latest Threads

Top