Skip to main content

Configuring memory with new applet plugin

4 replies [Last post]
matlik
Offline
Joined: 2004-07-07

I've been working with a third party enterprise solution that uses Java applets to run the front end on the user's machine. Depending on the user's roles and responsibilities, the typical amount of data that is loaded into the application can vary widely. Unfortunately, the common memory issue with the existing plug-in is amplified by SSL encryption, and our maximum usable heap size is limited 256M. Anything above that results in the JVM crashing. For most users, this is plenty, but for our super-users, 5 minute pauses between mouse clicks is not unheard of.

This far, I see that applet developers are being given the power to specify memory settings (certainly a good thing), but it also appears to be taking this power away from the users. I've installed build 10, and any attempts at setting -Xmx or -Xms have had zero effect.

Will users be able to adjust their applet memory requirements on a case by case basis, and if so, is the approach different from the old plug-in? Losing this feature all together would be disappointing. Developers can't always predict how much resources an application will need, particularly when users push the limits on the original vision, not to mention it breaks backward compatibility to some degree.

Much appreciated.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
rogyeu
Offline
Joined: 2006-07-30

Although user cannot adjust their applet memory requirements on a case by case basis in Java Control Panel, you can however allow user to input a desired memory size and create your own launching button which generates the and
tags on the fly and pass those memory requirements (or even runtime params) to the applet. You can't do this in the Classic Plug-In. :-)

Regards,
Roger Y.

kbr
Offline
Joined: 2003-06-16

The new plug-in supports both specification of JRE command line arguments in the Java Control Panel, Java Applet Runtime Settings, as well as on a per-applet basis in the HTML. The latter functionality is documented at https://jdk6.dev.java.net/testPlugIn.html . We have been fixing issues on an ongoing basis. 6629341 was I think the last major issue in this area. 6u10 build 11, which is available now for download, should work perfectly for both situations. Please try it and post if this does not appear to be the case.

There is no way (currently, anyway) for a user to specify a memory requirement on an applet-by-applet basis. The Java Control Panel settings apply to all applets. Only developers can specify -Xmx on an applet-by-applet basis via the HTML for the applet.

matlik
Offline
Joined: 2004-07-07

Thank you krb,

I updated to build 11 and performed the test again. To be honest, this question may have been caused by stupid user error and no bug at all.

My concern was with the former approach of setting memory via the Java Control Pannel. In my first attempt after the reinstallation, I incorrectly set the memory at '-Xms500 -Xmx500', forgetting to specify megabytes. I don't recall if I did the same befre the update or not. With a setting this small, the applet ignored my setting and used the default 64M.

Once I corrected my settings to '-Xms500M -Xmx500M', the Java Console reflected these settings as expected. Thank you for confirming this feature was not going away.

kbr
Offline
Joined: 2003-06-16

Thanks for following up. There's no such thing as a stupid question, only a stupid answer.