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

JRE 1.4 runtime parameters stored where?

 
Bob Sullivan
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
JRE 1.3 stores the plug-in runtime parameters in USER_HOME/.java/properties131 files. You can programatically modify the runtime parameters and a loading applet will use the modified values. Nice. However the mechanisim appears to have been changed for JRE 1.4. does anybody have a clue where the runtime parameters are stored?
 
Bob Sullivan
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I figured it out. JRE 1.3 stored the properties (Windows) at C:\Documents and Setting\username\.java\properties131_06. JRE 1.4 stores them in C:\Documents and Settings\username\Application Data\Sun\Java\Deployment\deployment.properties.
Here is a programatic way to update the properties that works for both 1.3 and 1.4:
sun.plugin.panel.ConfigurationInfo ci =
new sun.plugin.panel.ConfigurationInfo();
//use this to replace the original values.
String currentParams = ci.getJavaParms();
ci.setJavaParms("-Xms12m -Xmx128m -XX:MinHeapFreeRatio=5 -XX:MaxHeapFreeRatio=10");
try
{
ci.applyChanges();
}
catch (IOException e)
{
e.printStackTrace();
}
 
Michael Bunch
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

I am running an Applet that I need to be able to set the Heap memory at runtime. This code looks like the answer I have been looking for. But I keep getting package sun.plugin.panel does not exist. Any ideas on what I can do to make Java find that package?

Thanks,
Michael
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic