为长篇文章道歉,但我想知道在向Sun提交错误报告之前是否可以得到更多建议.
JVM:7u04
操作系统:Windows XP SP3
硬件:奔腾(R)双核E6700 3.20GHz,内存3.25 GB.
浏览:Google Chrome版本19.0.1084.52
当页面加载Applet时,它将一直挂起,直到我关闭它.检查窗口任务管理器,我发现如果杀掉Applet处理器,该页面将不会挂起.我尝试在Applet init()和start()上打印一些消息,但是这些消息没有显示.我只能做的是通过JVM获取完整转储,如下所示.有谁可以告诉我为什么Applet在它开始之前挂起?感谢帮助.
2012-06-07 10:08:25
Full thread dump Java HotSpot(TM) Client VM (23.0-b21 mixed mode, sharing):
"thread applet-com.arcare.extend.ExtendFunc-2" prio=4 tid=0x03021400 nid=0xbe8 in Object.wait() [0x03dad000]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0x22fa0158> (a sun.plugin2.message.Queue)
at sun.plugin2.message.Queue.waitForMessage(Unknown Source)
- locked <0x22fa0158> (a sun.plugin2.message.Queue)
at sun.plugin2.message.Pipe$2.run(Unknown Source)
at com.sun.deploy.util.Waiter$1.wait(Unknown Source)
at com.sun.deploy.util.Waiter.runAndWait(Unknown Source)
at sun.plugin2.message.Pipe.receive(Unknown Source)
at sun.plugin2.main.client.MessagePassingExecutionContext.doCookieOp(Unknown Source)
at sun.plugin2.main.client.MessagePassingExecutionContext.getCookie(Unknown Source)
at sun.plugin2.main.client.PluginCookieSelector.getCookieFromBrowser(Unknown Source)
at com.sun.deploy.net.cookie.DeployCookieSelector.getCookieInfo(Unknown Source)
at …Run Code Online (Sandbox Code Playgroud) 我需要一个在捕获错误时停止执行javascript的函数。例如如下:
function AA()
{
try{
executeScript();
}catch(e){
//stop execute javascript
}
}
function executeScript()
{
throw 'error';
}
function BB()
{
//some script
}
AA();
BB(); //don't execute when error happening
Run Code Online (Sandbox Code Playgroud)
有人知道怎么做吗?感谢帮助。