Java Applet and Browser Freeze

北慕城南 提交于 2019-12-08 06:51:36

问题


Is there a best practice for avoiding a browser freeze when loading an applet?

For my precise needs, the applet needs to be loaded when the web application is initialized, and is not a visual component (will be in a hidden div or hidden iframe).

As a reference, here is an old bug on SUN's side.


回答1:


1.6.0u10 will help greatly with most browsers, but with the older vms there is no way to avoid the browser freeze.




回答2:


Essentially, no there is not. Read the evaluation section of the bug you linked to. The issue is one of startup time for the JVM. About the best you can do is to keep the applet small so that it will load quickly. However, the browser freeze is happening because the browser has to wait for the VM to start. You can't ever drop that time to 0, so a short freeze is unavoidable.



来源:https://stackoverflow.com/questions/208161/java-applet-and-browser-freeze

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!