Java Solaris Communities Sun Store Join SDN My Profile Why Join?
 
Bug Database
Bug Detail
Quick Lists
Top 25 Bugs
Top 25 RFE's
Recently Closed Bugs
Printable Page Printable Page


Bug Database
Bug ID: 6433218
Votes 61
Synopsis Java applet fails with Large Java Runtime Parameter setting
Category java_plugin:misc
Reported Against
Release Fixed
State 11-Closed, duplicate of 6622332, request for enhancement
Priority: 3-Medium
Related Bugs 6528750
Submit Date 02-JUN-2006
Description
Running a Java applet/application with runtime parameter set above half of actual RAM available on the system fails to initialize applets. We are regularly receiving incidents from JRE consumers reporting this behavior affecting their applets/applications performance. 
This behavior is always reproducible ranging from multiple JRE version(s) - 1.5.0_06, 1.5.0_07 to Mustang-Beta and across multiple browser(s).

There are lot of valid comments from the customer in the Java forums about this behavior of Plug-in. Please see:
http://forum.java.sun.com/thread.jspa?threadID=697370

Steps to Reproduce:
1) Check system physical memory from:
Start -> Command -> systeminfo (XP only)
2) Ensure that you have one of the mentioned JRE version(s) installed: 1.5.0_06/_07 or 1.6.0-Beta2
3) Enable "<APPLET> tag support" for browsers from Java Control Panel (Start -> Control Panel -> Java -> Advanced - applet Tag Support)
3) Run the test vm applet from:
http://www.java.com/en/download/help/testvm.xml
Default behavior will run the test applet with dancing duke and installed/working JRE version information.

In the NEXT step - we will change the memory settings for JRE.

3) Go to Start -> Control Panel -> Java -> Java - Under "Java Runtime Environment Settings" 
4) Click on View - Double click in the box under "Java Runtime Parameters" and enter a value above half of system's physical memory. For example, if RAM is 1024 MB, enter a value "-Xmx768M" or above "-Xmx1024"(without quotes).
5) Click OK - Apply - OK
Note: Ensure that you have JRE cache cleared before attempting the next step
6) Start a new browser session (IE/Mozilla/Firefox)
7) Enter test vm url:
http://www.java.com/en/download/help/testvm.xml
An error message titled
"Java(TM) Plug-in Fatal Error
The Java Runtime Environment cannot be loaded."
or
"Java(TM) Plug-in Fatal Error
Several Java Virtual Machines running in the same process caused an error"
Note: Screenshots attached

Expected Behavior:
Reducing -Xmx setting down to 512M or below will run the applet normally. However, Applet should be able to run/perform without any issue irrespective of memory usage if available within the system RAM limit.

As a temporary relief, can we have a more user friendly error message.
Posted Date : 2006-06-02 09:04:16.0
Work Around
Set JRE parameter less then 3/4 of actual physical memory present in the system.
For example, 512 MB if RAM is 1024 MB.
Evaluation
This is actually a feature request to provide better error message for existing problem described in bug 6359309.  Changing to RFE.
Posted Date : 2006-06-13 18:39:54.0

There have historically been many reports of problems running applets
when a large -Xmx setting has been specified via the Java Control
Panel. Some bugs where this either definitely is the root cause, or
may be the root cause, include 6359309, 6433218, 6516270, 6528750, and
6559586.

Up until recently, it was not technically feasible to fix this problem
in the Java Plug-In due to its in-process architecture.

In recent months a new implementation of the Java Plug-In has been
developed which changes the execution model of applets. Instead of
running the applets in a JVM embedded in the web browser's process,
they are now run in a separate JVM process which communicates back to
the web browser. The initial checkin of this work done under bug ID
6622332.

This new plug-in solves this problem in two ways. First, since the JVM
is no longer running in the same process as the web browser, the
address space fragmentation problem (which occurs most often in the
Internet Explorer browser) does not interfere with the specification
of a large -Xmx value via the Java Runtime Parameters in the Java
Control Panel.

Second, the new Java Plug-In supports specification of JVM
command-line arguments, including -Xmx, on a per-applet basis via a
new java_arguments parameter in the applet's HTML. This eliminates the
need to do any global setting of this or other parameters in the Java
Control Panel.

The new Java Plug-In is currently available for testing in the early
access builds of the "6uN" release, which can be downloaded from
https://jdk6.dev.java.net/6uNea.html . See
https://jdk6.dev.java.net/testPlugIn.html for instructions on testing
the new Java Plug-In specifically. In 6uN build 10, the new Java
Plug-In is enabled by default upon installation on the Windows
platform; see the testing instructions for installation on the Solaris
and Linux platforms.

Customer feedback so far indicates that the new Java Plug-In
conclusively solves this longstanding problem.

For tracking purposes, this bug is being closed as a duplicate of
6622332, which is the "umbrella" bug covering the initial integration
of the new Java Plug-In.

Note that currently the new plug-in does not change the default heap
size for applets, but we believe that this will be far less of an
issue now that an individual applet can request a particular heap
size. We are open to revisiting this particular issue, in particular
in the context of the new plug-in.

Please try the new Java Plug-In and file any issues against it under
product java, category java_plugin, subcategory plugin2.
Posted Date : 2008-01-17 04:59:05.0
Comments
  
  Include a link with my name & email   

Submitted On 23-AUG-2006
hanafey
I do not agree this is an RFE. It is a bug.

On a new Windows XP box with 4 GB of RAM, the most I can set -Xmx is around 800m in the control panel. However, for an application I can use -Xmx1400m. In fact I can run 3 apps concurrently with -Xmx1400m.

If I set -Xmx1500m the application comes up,  but the buttons do not show the text labels they show with the 1400 setting, so there is a wierd grey zone (the zone is  from 1469m to 1610m, above which there is total failure).

An RFE might ask that -Xmx2000m should work (this is what systeminfo shows for "available" virtual memory).

It is a bug that the plugin VM cannot run with a setting that an application runs with.

But the problem is even worse. One of our high end users has a Windows XP system also with 4GB of RAM, and he is only able to squeeze -Xmx516 out of the control panel. This is despite the fact that the an application can also be run with -Xmx1400m on this machine.

Java developers ought to be able to rely on clients having access to close to 2GB for running demanding applets -- in our case in bioinformatics this need is reality.


Submitted On 04-SEP-2006
I am running a XP machine with two 2GB sticks for a total of 4GB RAM installed, showing:

Total Physical Memory: 3,326 MB
Available Physical Memory: 2,663 MB
Virtual Memory: Max Size: 2,048 MB
Virtual Memory: Available: 2,008 MB
Virtual Memory: In Use: 40MB

I reset the parameter in 1.5.0_06 to -Xmx300MB and Firefox would continue to work, but IE 7 produced the error messages.   I am now running _06 with =Xmx300m and _08 with no entry ion the parameters with no problems in all browsers.  


Submitted On 07-SEP-2006
I entered -Xmx300m as the parameter in 1.5.0_08 and Java failed to initiate in both Firefox and IE7.  I removved the parameter (leaving it blank) in both 1.5.0_06 and _08 and Java now functions fine.  A test shows I am on 1.8.0_08.


Submitted On 07-SEP-2006
Make that 1.5.0_08


Submitted On 15-NOV-2006
mattelkins
This is a *bug*.  On my system (IE7, JRE 1.5.0_09) I can't get much above 1/4 of physical memory (1GB) before encountering the error.  Our application consists of multiple, complex applets and this bug causes us considerable grief.


Submitted On 16-NOV-2006
rwhair
Definitely a bug. On an XP Pro machine with 2 GB of RAM using JRE 1.4.2_03, Firefox crashes with -Xmx set to 256MB. But I can run a Java application from the command line with -Xmx1500m and it works fine.


Submitted On 13-DEC-2006
hundel
This is a serious problem for our customers.   In the past we've successfully recommmended increasing -Xmx param to handle large documents.  We commonly see the reported error message in these same customers immediately upon upgrading to IE 7.   On my system, I have 1GB available RAM and can  no longer start the plug-in using -Xmx300 after upgrading.


Submitted On 27-JAN-2007
Very big problem here too with 2GB Ram I can only get  -Xmx512m to work.  Also every workstation that connects and uses this java system must be changed. they also can only use about 1/4 of their available ram.  This is something that negates any value of having  the remote java access feature in our products. Using IE7 and Java 1.5.0_10, on winxp pro. Using firefox also shows the same problem.


Submitted On 03-MAY-2007
I receive the exact same error in the following settings on a machine with 4 GB of Ram.  I have tried to set 
 -Xmx to:  512m, 256m and 128m; however the exact same problem occurrs.   I am running Java 1.6 on Vista with IE 7.  If I remove the parameter completely the applet will load; however, due to the memory requirements it does not run properly.  


Submitted On 18-MAY-2007
i have another problem
am running  Jre version 1.6. 0_01
Operating system :windows Xp
OS  version 5.1 with 1.00 GB of RAM .i already set the Parameters to a value -Xmx 500 i no longer recieves error masseges .but my problem is with yahoo games. applet load ok but whenever i try to start a game or open a table applet crashes and leaves me with a blank page and the main site for the game change to error logging into server.


Submitted On 05-JUN-2007
I concur with some of these comments.  We cannot set the java max heap size above 128MB on a machine with 1GB of RAM.

(Using Java 1.5.0_11 and IE7.)


Submitted On 18-JUN-2007
Ladi.Petera
The maximum i can get on 1Gb RAM machine is -Xmx192M in IE7. Firefox seems to have a higher limit, since 256M was o.k.

This issue also causes us and our custommer trouble .


Submitted On 25-JUN-2007
This has not worked for me.  I have 1GB of ram and plan on upgrading soon.  But I have plenty of space more than half.  I tried the fix as mentioned above at many different settings and set it to –Xmx512, -Xmx256M, -Xmx126M, -Xmx64M then cleared my JRE cache on each time.  With no luck still the same error each time.  This is not a fix 



Leon


Submitted On 22-AUG-2007
reverseswing
I agree with Leon. I have 1GB of RAM and I can't seem to make this work at ANY setting.   
Changing VM settings to System Managed helped but after 2nd reboot, it reverted back.


Submitted On 06-SEP-2007
BUG...I am running IE7...changed parameters and noting works. I receive either "Java Plug-in Fatal Error....Several Java Virtual Machines running in the sam process caused an error." or " "Java Plug-in Fatal Error....The Java Runtime Environment cannot be loaded." The 2nd error is after I change the memory settings. My OS is XP Pro, 1GB RAM. I did not have this issue until I upgraded. 


Submitted On 02-NOV-2007
cwhistler
This absolutely is a bug and it is seriously affecting my clients and my use of this plugin.

Can someone from Sun provide an update since this has been a known issue for well over a year?


Submitted On 06-NOV-2007
surly
I have a java applet that runs fine in Firefox but kills the IE7 browser running on windows xp.
They share the same java jre (v. 1.5, but same result for 1.6).
Clearly it is a java - IE7 problem.

Why is this still an issue ?!  Why has Sun and/or MS not figured it out after one year ?!



Submitted On 16-DEC-2007
WisconsinMom
I had no problem with Java Applets until I finally broke down and installed IE7 recently. Now I get the same error message when trying to access "talking ecards" on Blue Mountain.  When I go to control panel and runtime parameters, under Users, I have two versions of java enabled.  Both 1.6.0_01 and 1.6.0_03  Would dsabling the earlier version possibly work?  I am pretty computer illiterate and all these other fixes are way beyond me!


Submitted On 16-DEC-2007
WisconsinMom
And I want to add...I had no trouble playing Yahoo games yesterday, but today, I get the same error about several virtual machines running at the same time.  I have made no updates or changed to the computer in the meantime.


Submitted On 22-DEC-2007
lkuhn65
I have followed all of he suggested steps in this bug report an find that I cannot get jre1.6.0_03 to run reliably on XP SP 2.  Right after installation, applets will run, however if log out of XP and then log back in I'm back in the same broken state.  I will not spend any more time trying to use any Java app until this is fixed. 


Submitted On 15-JAN-2008
mela100
Plug-in VM cannot run normally interpret as Virtual Machine cannot run, but I notice it is a Virtual Memory problem. 

I am running XP with 2GB RAM and 250GB hardisk, As I am using Adobe program, therefore I set my virtual memory (pagefile) to 2048MB, java plug-in fata error problem encounter. however when I lower the virtual memory to 1300MB, problem solve, but if more than one java machine load error message "Serveral Java machine running in same process caused error" and I need to set -Xmx parameter in Java runtime, problem solve.  

However, when I clone to a new hardisk, and boot from the new hardisk, problem simply solve, everything run at default without changing any setting, such as including -Xmx parameter, set virtal memory as high as 4092MB  

Lastly, my suggestion is simply change a new hardisk. Cheer...



PLEASE NOTE: JDK6 is formerly known as Project Mustang