Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JVM Memory

 
omar bili
Ranch Hand
Posts: 177
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey guys,
i have a java applet running on client side whose purpose is to display images. The images sometimes can be large in size, so i need to increment the size of jvm on the client side, but i need to do this programmatically(without user's intervention). One idea i had was trying to manipulate the deployment.properties file found under <USER_HOME>\Application Data\Sun\Java\Deployment, and i tried using System.getProperty("user.home") to reach for the <USER_HOME>, this ran perfectly well on jbuilder (using the applet viewer), but when trying to run the applet on IE6.0, the applet was forbidden from geting the "user.home" property.
My question is that is there a way to get the user home dir of the user some other way in order to modify this file?
if not, how do you suggest i change the memory for the jvm programmatically?
thanks,
 
Ulf Dittmer
Rancher
Posts: 42969
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Once the JVM is up and running, you can't change its memory allocation.

To get at the user.home property the applet either needs to be signed, or a local policy file must be adapted. More info can be found in the Applets FAQ, linked in my signature.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic