Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I start an Java applet with more memory?

The default 64 MB max heap memory can be small for a large Java application. Are there any applet parameter to increment this for a signed applet?

For a Java program this is a simple command line parameter but how this work for an applet in the browser.

like image 987
Horcrux7 Avatar asked Sep 19 '08 13:09

Horcrux7


People also ask

How much RAM can Java handle?

To turn performance you can use certain parameters in the JVM. Set the maximum available memory for the JVM to 1800 Megabyte. The Java application cannot use more heap memory than defined via this parameter. Increase the values in these parameters to avoid the following error: "Exception in thread java.

How can JVM memory be altered?

Non-Heap Memory It is created at the JVM startup and stores per-class structures such as runtime constant pool, field and method data, and the code for methods and constructors, as well as interned Strings. The default maximum size of non-heap memory is 64 MB. This can be changed using –XX:MaxPermSize VM option.

Why applet is discontinued?

It was simple to make it work on FreeBSD, Linux, Microsoft Windows and macOS – that is, to make it cross-platform. Applets were supported by most web browsers through the first decade of the 21st century; since then, however, most browsers have dropped applet support for security reasons.


2 Answers

The new plugin architecture in JDK6u10 supports this. Prior to that, the only way to do it was in the Java control panel.

like image 85
jsight Avatar answered Sep 28 '22 02:09

jsight


Use the JavaConsole -> Java -> Java Applet Runtime settings to define the initial and maximum memory allocation (using -Xms128 -Xmx512 or similar).

I understand that newer versions of Java (6?) allow the developer some influence over these settings but I haven't been there yet...

like image 33
paul Avatar answered Sep 28 '22 02:09

paul