Can I set JVM memory size when running applets?

Hi,

I have downloaded an applet that renders panoramic images and

I have a problem with Java memory. I remember that default maximum

size that applet can use is 70MB, and the problem is 70MB is

not enough when rendering big images. It is OK when I add

"-Xmx -Xms" parameters in the Java Control but I cannot tell

everyone who wants to see my images to go control panel, add

parameters etc..

So my question is...

Is it possible add "-Xmx -Xms" parameters inside the applet file

so that these parameters run automatically when executing applet?

Thanks in advance for your reply!

Hyung

[668 byte] By [hyunga] at [2007-11-27 10:54:27]
# 1

I'm not sure, but I think I read somewhere that you cannot change the applet's environment automatically. The user would have to change the settings. I think it has to do with being set before Java starts running, so by the time your applet gets loaded, it's too late to change it.

spanglercoa at 2007-7-29 11:50:21 > top of Java-index,Desktop,Core GUI APIs...
# 2

This seems to me to be the worst feature of Java. Most modern machines have masses of memory, and even virtual memory when that runs out, yet Java limits itself to running in a predefined slot.

In my own code I have tried to cope with this by catching 'out of memory' errors, and then unloading images (which tend to use a lot of memory), and retrying. But it's all rather complex when you know that the machine you are running on has no problem with memory, just that Java has boxed itself in!

And the thought of getting average users to type in -xms thing in some distant box is silly, especially if they type it wrong, because then Java won't even start.

GeoffTitmussa at 2007-7-29 11:50:21 > top of Java-index,Desktop,Core GUI APIs...
# 3

> Hi,

>

> I have downloaded an applet that renders panoramic

> images and

>

> I have a problem with Java memory. I remember that

> default maximum

>

> size that applet can use is 70MB, and the problem is

> 70MB is

>

> not enough when rendering big images. It is OK when I

> add

>

> "-Xmx -Xms" parameters in the Java Control but I

> cannot tell

>

> everyone who wants to see my images to go control

> panel, add

>

> parameters etc..

>

> So my question is...

>

> Is it possible add "-Xmx -Xms" parameters inside the

> applet file

>

> so that these parameters run automatically when

> executing applet?

>

> Thanks in advance for your reply!

>

> Hyung

A potential workaround I would try is is use ByteBuffers

(T)

tswaina at 2007-7-29 11:50:21 > top of Java-index,Desktop,Core GUI APIs...