Setting memory heap size

Hi,

I would like to know how to set the default memory

heap size to 128 MB while installing the Java Plugin

itself.

Is there any environment variable available for setting

this?

I dont want to use the Control Panel option for setting

it.

Thanks for your help.

[321 byte] By [gkumarc1] at [2007-9-26 3:29:20]
«« RMI
»» First One
# 1

Hi Gkumarc1,

Plugin 1.3.0 (and after) reads the property file in .java directory of user's home directory. Java runtime parameter is saved in the property file. Here is an example of it:

# Java(TM) Plug-in Properties

# DO NOT EDIT THIS FILE. It is machine generated.

# Use the Activator Control Panel to edit properties.

#

....

javaplugin.jre.params=-Xmx 128m

..

Hope this helps.

Sun-DTS

jdcusr1 at 2007-6-29 11:53:53 > top of Java-index,Desktop,Deploying...
# 2

> Hi Gkumarc1,

>

> Plugin 1.3.0 (and after) reads the property file in

> .java directory of user's home directory. Java

> runtime parameter is saved in the property file. Here

> is an example of it:

>

> # Java(TM) Plug-in Properties

> # DO NOT EDIT THIS FILE. It is machine generated.

> # Use the Activator Control Panel to edit properties.

>

> #

> ....

>

> javaplugin.jre.params=-Xmx 128m

>

> ..

>

> Hope this helps.

>

> Sun-DTS

Is there a way to set the default heap size on the fly? Meaning, we want to avoid the need for our customers to go into their control panel and make this setting. Instead, we would like to have the applet load with our preferred default VM size. This would allow us to change the preferred size during some future performance enchancements without having to contact all of our 2,000+ external customers. Is there something that can be put in the PARAM tag within the HTML that specifies the preferred/recommended default size?

Any help would be greatly appreciated.

harshjdc at 2007-6-29 11:53:53 > top of Java-index,Desktop,Deploying...
# 3
Has anyone found a way to dynamically set the amount of memory the Plug-In should start-up with as mentioned previously?
taggor at 2007-6-29 11:53:53 > top of Java-index,Desktop,Deploying...
# 4
Is setting the memory heap size controls the memory used by the IE process, which running the applet?
surya_v at 2007-6-29 11:53:53 > top of Java-index,Desktop,Deploying...
# 5
I, too, need to set the heap size for an APPLET. Requiring customers to fiddle with their java configuration files is not an option -- is there a way to specify the heap size information programatically, or via the APPLET tag?Thanks!
greg_hassett at 2007-6-29 11:53:53 > top of Java-index,Desktop,Deploying...
# 6
Hello,If someone could anwser this, it would be very helpfulM.
mferland2000 at 2007-6-29 11:53:53 > top of Java-index,Desktop,Deploying...
# 7

I remember that some chat transcript - I think on new features in Mustang - contains a quote that it is not possible to change heapsize after the VM has started. So, given that your applet might not be the first one the web browser starts it would be impossible to change the heap size.

I think the reason why the heap size cannot be changed after the VM is started was that the heap would then be fragmented - which makes heap memory management more difficult.

Another thing to consider is security: I definitely don't want anyone to be able to set memory requirements via applet tag - at least not without a confirmation dialog. Otherwise malicious applets could just require several GB of heap memory and the VM would try to allocate them and maybe crash or at least slow everything else down.

vaugustin at 2007-6-29 11:53:53 > top of Java-index,Desktop,Deploying...
# 8

Hey i have the same issue, how did you solve it?

> > Hi Gkumarc1,

> >

> > Plugin 1.3.0 (and after) reads the property file

> in

> > .java directory of user's home directory. Java

> > runtime parameter is saved in the property file.

> Here

> > is an example of it:

> >

> > # Java(TM) Plug-in Properties

> > # DO NOT EDIT THIS FILE. It is machine generated.

> > # Use the Activator Control Panel to edit

> properties.

> >

> > #

> > ....

> >

> > javaplugin.jre.params=-Xmx 128m

> >

> > ..

> >

> > Hope this helps.

> >

> > Sun-DTS

>

> Is there a way to set the default heap size on the

> fly? Meaning, we want to avoid the need for our

> customers to go into their control panel and make

> this setting. Instead, we would like to have the

> applet load with our preferred default VM size. This

> would allow us to change the preferred size during

> some future performance enchancements without having

> to contact all of our 2,000+ external customers. Is

> there something that can be put in the PARAM tag

> within the HTML that specifies the

> preferred/recommended default size?

>

> Any help would be greatly appreciated.

netspirit at 2007-6-29 11:53:53 > top of Java-index,Desktop,Deploying...
# 9

Hi.

Even if this has been a very requested feature for a long time, as of now there seems to be no solution to this need.

Most answers that you can find on the web say something like "Use Java Web Start instead", where you can specify the max and min heap size in the JNLP descriptor. Java Web Start is really fine, but is not a perfect substitute for Java Applet... They are different technologies, with a very different behavior from the end user experience point of view.

I believe I've see some Bug Report of RFE in Sun's bug database about this problem, but I am unable to find it now. If someone can find the related RFE or Bug Report, please let us know on this forum, and many people may decide to vote for it, thus improving the chance to see it fixed in future JRE releases.

Regards,

Marco.

neologica at 2007-6-29 11:53:53 > top of Java-index,Desktop,Deploying...
# 10

Is there anything like this for standalone Java applications?

I want a configuration that everytime I use "java" it implicitly starts with -Xmx256m

That's a workaround for Vitual Servers that dynamically allocates memory to the SO. The JVM can't start without -Xmx option in those cases.

- for more info, see http://www.jroller.com/page/cyblogue/weblog/godaddy_com_virtual_dedicated_server

Thanks in advance.

Stutz

flavio_stutz at 2007-6-29 11:53:53 > top of Java-index,Desktop,Deploying...