wood burning stoves 2.0*
The moose likes Applets and the fly likes Can I set JVM memory size when running applets? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Applets
Bookmark "Can I set JVM memory size when running applets?" Watch "Can I set JVM memory size when running applets?" New topic
Author

Can I set JVM memory size when running applets?

Sang-Wook Kim
Ranch Hand

Joined: Jan 07, 2004
Posts: 36
Hi,

I have downloaded an applet that renders 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
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41621
    
  55
No, the applet and its tag have no control over those settings. That could be used for denial-of-service attacks: imagine the page setting the JVM to take as much memory as the system has, and then using it all up.


Ping & DNS - my free Android networking tools app
Sang-Wook Kim
Ranch Hand

Joined: Jan 07, 2004
Posts: 36
Is there any other way to solve this memory issue?
Ashok Mor
Ranch Hand

Joined: Jul 17, 2007
Posts: 44
Hi Sang-Wook Kim ,

You can do it while splitting an image into number of spices and take each spices in diff diff Canvas, and finally put them over an Applet.


Ashok Mor.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Can I set JVM memory size when running applets?